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
When combining multiple regexes in a set where some are anchored and
others aren't, it's possible to wind up in a situation where prefix
scanning is used. This is bad, because it can lead to some of the
anchored regexes matching where they shouldn't be allowed to match.
As a result, we disable all literal optimizations for regex sets if
*any* regex in the set is anchored.
Fixesrust-lang#358
RegexSet: fix literal optimization bug
When combining multiple regexes in a set where some are anchored and
others aren't, it's possible to wind up in a situation where prefix
scanning is used. This is bad, because it can lead to some of the
anchored regexes matching where they shouldn't be allowed to match.
As a result, we disable all literal optimizations for regex sets if
*any* regex in the set is anchored.
Fixes#358
Compiled with regex 0.2.1
Output:
The text was updated successfully, but these errors were encountered: