2 ms·
> Unfortunately, it’s easy to write a regular expression that has exponential time behavior when parsing input This footgun can be easily avoided without rippi
by cbarrick 2y ago
> Unfortunately, it’s easy to write a regular expression that has exponential time behavior when parsing input
This footgun can be easily avoided without ripping out regex support altogether. Just switch to a regex engine that is actually regular, like re2.
See also "Regular Expression Matching Can Be Simple And Fast" by rsc [1].
[1]: https://swtch.com/~rsc/regexp/regexp1.html https://swtch.com/~rsc/regexp/regexp1.html