4 ms·
you could use a regex library not vulnerable to quadratic behaviour in the first place?
by syrrim 4y ago
you could use a regex library not vulnerable to quadratic behaviour in the first place?
- woodruffw 4y agoThis is not actionable general-purpose advice: many languages have regular expression APIs built around PCRE, which is much more of a "general advanced pattern matching" language than just pure regular expressions. Many of PCRE's features (like backreferences) are widely used and allow for parsing of non-regular inputs, meaning that you can't transform them into a linearly-evaluable regular expression.