-
Notifications
You must be signed in to change notification settings - Fork 177
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
[^\w\W]+
does not compile
#284
Comments
Try: |
I'm already using raw C++ string literals (see attached Godbolt link), the regex is parsed correctly as can be seen in the error message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: