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
XRegExp 3.0.0 introduced support for ES6's \u{...} syntax in all browsers, but requires native flag u if this syntax is used for astral code points--i.e. above \u{FFFF}. However, it would not require much work to support astral \u{...} outside of character classes using surrogate pairs. You'd simply need to generate the surrogate pair and wrap it with (?: ). The wrapping would allow it to work as expected with following quantifiers.
Unfortunately, an error would still need to be thrown if astral \u{...} is used within character classes and the regex does not use native u.
Con: Syntax that works only outside of character classes has potential to cause confusion or frustration.
The text was updated successfully, but these errors were encountered:
XRegExp 3.0.0 introduced support for ES6's
\u{...}
syntax in all browsers, but requires native flagu
if this syntax is used for astral code points--i.e. above\u{FFFF}
. However, it would not require much work to support astral\u{...}
outside of character classes using surrogate pairs. You'd simply need to generate the surrogate pair and wrap it with(?: )
. The wrapping would allow it to work as expected with following quantifiers.Unfortunately, an error would still need to be thrown if astral
\u{...}
is used within character classes and the regex does not use nativeu
.Con: Syntax that works only outside of character classes has potential to cause confusion or frustration.
The text was updated successfully, but these errors were encountered: