{"action":"closed","issue":{"url":"https://api.github.com/repos/firasdib/Regex101/issues/244","labels_url":"https://api.github.com/repos/firasdib/Regex101/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/firasdib/Regex101/issues/244/comments","events_url":"https://api.github.com/repos/firasdib/Regex101/issues/244/events","html_url":"https://github.com/firasdib/Regex101/issues/244","id":57726412,"number":244,"title":"PHP code generator: wrong syntax for backreferences","user":{"login":"borekb","id":101152,"avatar_url":"https://avatars.githubusercontent.com/u/101152?v=3","gravatar_id":"","url":"https://api.github.com/users/borekb","html_url":"https://github.com/borekb","followers_url":"https://api.github.com/users/borekb/followers","following_url":"https://api.github.com/users/borekb/following{/other_user}","gists_url":"https://api.github.com/users/borekb/gists{/gist_id}","starred_url":"https://api.github.com/users/borekb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borekb/subscriptions","organizations_url":"https://api.github.com/users/borekb/orgs","repos_url":"https://api.github.com/users/borekb/repos","events_url":"https://api.github.com/users/borekb/events{/privacy}","received_events_url":"https://api.github.com/users/borekb/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-15T10:55:18Z","updated_at":"2015-03-22T14:28:03Z","closed_at":"2015-03-22T14:28:03Z","body":"This is an example of generated PHP code:\r\n\r\n    $re = \"...\";\r\n    $str = \"...\";\r\n    $subst = \"\\1\\2new-value\\4\";\r\n     \r\n    $result = preg_replace($re, $subst, $str);\r\n\r\nThe `$subst` string is wrong - should contain `$1`, `$2` and `$4` instead of `\\1`, `\\2` and `\\4`.\r\n\r\nNote: I can, in the UI, change `\\1` to `$1` and it will work fine in the replacement preview pane, however, the UI suggests to use the backslash syntax in which case the generator should convert `\\` to `$` so that the final code works."}}