by patrec · 6y ago · 0 comments
> The regexp implementation provided by this package is guaranteed to run in time linear in the size of the input.
Python's is exponential, because it inherits all the non-regular "regular" expression mess (such as lookbehind and backrefs) from perl.
One would assume esr would have marinated in unix culture for long enough to be aware of this.
Also, Perl-style (ir-)regular expressions, despite their popularity, are not a worthwhile abstraction IMO and thus should not be enshrined in the standard library of programming languages, even if you want them in your library eco-system for end-user facing API compatibility.