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
Tweak line-feed regex to avoid exponential backtracking
Before this change, the `(.|\f)*` pattern can lead to exponential
backtracking because it has to try many different combinations. Using
the extra `+` makes the matching 'possessive', so once a match is
found no other alternatives are considered. This is safe for these
regexes, because the pattern in question is always at the end of the
match, so there's no trailing characters that might need to be
'removed' from the match during a backtrack.
This is a follow-up to 2bd2600 and 92677e9.
#cherrypick
PiperOrigin-RevId: 829457102
0 commit comments