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
In regex <1.8.0, it was possible to create a regex containing \W inside of a (?-u:) group. This no longer works and makes regex construction fail instead. Looks like we should have been using regex::bytes::Regex the whole time, but it hasn't been a problem so far and we were only searching within strs anyways.
use regex::Regex;fnmain(){Regex::new(r"(?-u:\W)").unwrap();}
What is the actual behavior?
Crashes.
What is the expected behavior?
Doesn't crash. (not because that's more sensible, but because it has been possible for a very long time and people might be relying on it accidentally, like we did in Ruma)
The text was updated successfully, but these errors were encountered:
Thanks for the report. This change was an explicit bug fix. See #895. It's mentioned in the CHANGELOG.
The previous behavior was incorrect, and it could result in runtime panics due to match spans that split a codepoint boundary. So it never really worked.
What version of regex are you using?
1.8.1
Describe the bug at a high level.
In regex <1.8.0, it was possible to create a regex containing
\W
inside of a(?-u:)
group. This no longer works and makes regex construction fail instead. Looks like we should have been usingregex::bytes::Regex
the whole time, but it hasn't been a problem so far and we were only searching withinstr
s anyways.What are the steps to reproduce the behavior?
What is the actual behavior?
Crashes.
What is the expected behavior?
Doesn't crash. (not because that's more sensible, but because it has been possible for a very long time and people might be relying on it accidentally, like we did in Ruma)
The text was updated successfully, but these errors were encountered: