You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Same issue, /\{.*\}/u.exec("abc{foo}xyz") is optimized to /{.*}/u.exec("abc{foo}xyz") which produces Uncaught SyntaxError: Invalid regular expression: /{.*}/: Lone quantifier brackets.
The u flag disables Annex B extension, and makes regex behave like strict mode.
I noticed this problem because require-unicode-regexp recommended u to me.
/\]/u
is getting optimized to/]/u
which producesParsing error: Invalid regular expression: /]/: Lone quantifier brackets
.The text was updated successfully, but these errors were encountered: