QuickJS rejects an escaped dash inside a `v`-flag `\q{...}` class string. **Reproducer** ```javascript var r = new RegExp("[\\q{\\-}]", "v"); print(r.test("-")); ``` **Expected result** The regular expression should compile successfully and print: ```text true ``` In Unicode Sets mode, `-` is a `ClassSetReservedPunctuator` and is valid when escaped as `\-` inside `\q{...}`. **Actual result** QuickJS throws: ```text SyntaxError: invalid escape sequence in regular expression ``` **QuickJS version** QuickJS version/release: v0.15.1 Operating system: Ubuntu 24.04 x86_64
Activity
saghul commentedon Jul 24, 2026
Can you try latest master?
kid-lxy commentedon Jul 25, 2026
I tested it with the latest master commit 3d3cf3d, but the issue still reproduces.
sr5434 commentedon Aug 17, 2026
I'm working on a patch and will try to get a PR up when I can