Not sure here, but maybe there's an issue.
Query looks like this:
FILTER regex(str(?mbox), "@work\\.example$")
Output looks like this
{
  "type": "filter",
  "expression": {
    "type": "operation",
    "operator": "regex",
    "args": [
      {
        "type": "operation",
        "operator": "str",
        "args": [
          "?mbox"
        ]
      },
      "\"@work\\.example$\""
    ]
  }
}Decoding "\"@work\\.example$\"" turns it into "@work\.example$" which is wrong.
Am I right here? That's a bug?