{"action":"closed","issue":{"url":"https://api.github.com/repos/svaarala/duktape/issues/142","labels_url":"https://api.github.com/repos/svaarala/duktape/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/svaarala/duktape/issues/142/comments","events_url":"https://api.github.com/repos/svaarala/duktape/issues/142/events","html_url":"https://github.com/svaarala/duktape/issues/142","id":63259816,"number":142,"title":"Duktape chokes on literal braces in RegExp","user":{"login":"fatcerberus","id":4097841,"avatar_url":"https://avatars.githubusercontent.com/u/4097841?v=3","gravatar_id":"","url":"https://api.github.com/users/fatcerberus","html_url":"https://github.com/fatcerberus","followers_url":"https://api.github.com/users/fatcerberus/followers","following_url":"https://api.github.com/users/fatcerberus/following{/other_user}","gists_url":"https://api.github.com/users/fatcerberus/gists{/gist_id}","starred_url":"https://api.github.com/users/fatcerberus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatcerberus/subscriptions","organizations_url":"https://api.github.com/users/fatcerberus/orgs","repos_url":"https://api.github.com/users/fatcerberus/repos","events_url":"https://api.github.com/users/fatcerberus/events{/privacy}","received_events_url":"https://api.github.com/users/fatcerberus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/svaarala/duktape/labels/compliance","name":"compliance","color":"5319e7"},{"url":"https://api.github.com/repos/svaarala/duktape/labels/realworld","name":"realworld","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-20T16:33:05Z","updated_at":"2016-01-17T12:13:51Z","closed_at":"2016-01-17T12:13:51Z","body":"The following code works fine in all other JS engines, but Duktape chokes on it (\"invalid quantifer\"):\r\n\r\n```\r\nfunction FormatString(s) {\r\n    var a = arguments, i = 1;\r\n    return s.replace(/{\\?}/g, function() { return a[i++]; });\r\n}\r\n\r\nAbort(FormatString(\"Hello {?} how are you?\", \"John\"));\r\n```"}}