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
I was trying to make a regex that does not match anything using the [^\w\W] syntax. It worked by itself, but failed to compile once I used a greedy quantifier on it.
I played around some more and the issue appears when using a negated character class like \W or \D inside a negated set that is
quantified with a greedy operator. Lazy and possessive versions compile just fine.
I was trying to make a regex that does not match anything using the
[^\w\W]
syntax. It worked by itself, but failed to compile once I used a greedy quantifier on it.I played around some more and the issue appears when using a negated character class like
\W
or\D
inside a negated set that isquantified with a greedy operator. Lazy and possessive versions compile just fine.
Godbolt: https://godbolt.org/z/edKfYeqo9
Here's the error:
The text was updated successfully, but these errors were encountered: