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
{{ message }}
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
For completeness — I know it's been discussed in other issues as a solution to various issues of context-sensitivity, though it's suboptimal in terms of conciseness and readability:
One option (mentioned elsewhere and elsewhere) is to just make all of those escapes legal (as identity escapes) in u-mode regexes. I think that's the easiest - we wouldn't want to give those different meanings than in v-mode, I think.
It seems like adding a second flags argument to RegExp.escape() would provide a pretty ergonomic solution (as in the RegExp constructor), if there are differences in required escapes.
There is no way of escaping that works in all scenarios:
[<]
[\<]
/u
nor/v
/u
/v
What’s the best approach then? Only support
/v
?More information: tc39/proposal-regexp-v-flag#71
The text was updated successfully, but these errors were encountered: