-
Notifications
You must be signed in to change notification settings - Fork 924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
invalid escape sequence in regular expression #374
Comments
I fixed that in 2023 in quickjs-ng/quickjs@f0ef9e1 although more as a side effect of a larger change. I think it should be possible to cherry-pick only the relevant bits though. |
It's more of a feature addition than a fix IMO |
I don't see how this is a "feature". It's clearly a bug. Node, and most browsers accept the regex syntax. The syntax is part of the regexp documentation. |
I understand it better now and yeah it isn't a feature. It's a bug that only shows up when the code has an unnecessarily escaped |
@benatkin Exactly. I would consider this low-priority except for the fact that this is in several very popular npm packages including ajv. |
quickjs compilation is failing with the error message
invalid escape sequence in regular expression
on the following code:However, if the 'u' flag is omitted it compiles fine.
I found this problem using the very popular npm library
ajv-formats
(26 million DL/week)The text was updated successfully, but these errors were encountered: