Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

invalid escape sequence in regular expression #286

Closed
kvinwang opened this issue Feb 29, 2024 · 0 comments · Fixed by #288
Closed

invalid escape sequence in regular expression #286

kvinwang opened this issue Feb 29, 2024 · 0 comments · Fixed by #288

Comments

@kvinwang
Copy link
Contributor

console.log(/[\-]/gu)

This code works on v8 but get error invalid escape sequence in regular expression on quickjs.

bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Mar 2, 2024
The non-Unicode version of the pattern was already accepted.

test262 does not seem to test this particular pattern and I'm not 100%
sure if it's actually per spec but both V8 and Spidermonkey accept it.

Fixes: quickjs-ng#286
bnoordhuis added a commit to bnoordhuis/quickjs that referenced this issue Mar 2, 2024
The non-Unicode version of the pattern was already accepted.

test262 tests it in an inverted sense in
test/built-ins/RegExp/unicode_restricted_identity_escape.js but
it appears to be per spec and both V8 and Spidermonkey accept it.

Fixes: quickjs-ng#286
bnoordhuis added a commit that referenced this issue Mar 2, 2024
The non-Unicode version of the pattern was already accepted.

test262 tests it in an inverted sense in
test/built-ins/RegExp/unicode_restricted_identity_escape.js but
it appears to be per spec and both V8 and Spidermonkey accept it.

Fixes: #286
malbarbo added a commit to malbarbo/rquickjs that referenced this issue Sep 30, 2024
malbarbo added a commit to malbarbo/rquickjs that referenced this issue Sep 30, 2024
bluesky950520 pushed a commit to bluesky950520/quickjs that referenced this issue Mar 14, 2025
The non-Unicode version of the pattern was already accepted.

test262 tests it in an inverted sense in
test/built-ins/RegExp/unicode_restricted_identity_escape.js but
it appears to be per spec and both V8 and Spidermonkey accept it.

Fixes: quickjs-ng/quickjs#286
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant