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
{{ message }}
Repository navigation
Regex compiler/ source generator can use {Last}IndexOf for strings in greedy char loop #62670
In greedy char loops, if the loop is followed by a known literal, when backtracking we LastIndexOf to find the next possible place to try to continue the match, rather than just backing up one char at a time. Today we only do this based on a subsequent char literal, but we can extend it to look for a subsequent multi as well. We can also build a set of all possible subsequent chars and do a LastIndexOfAny, e.g. for ".*[abc]".
changed the title [-]Regex source generator can use {Last}IndexOf for strings in greedy char loop[/-][+]Regex compiler/ source generator can use {Last}IndexOf for strings in greedy char loop[/+]on Dec 13, 2021
Activity
[-]Regex source generator can use {Last}IndexOf for strings in greedy char loop[/-][+]Regex compiler/ source generator can use {Last}IndexOf for strings in greedy char loop[/+]