Re:Python, Catastrophic Regular Expressions and the GIL (2013)
by asicsp on Monday November 14, 2022 @07:33AM
(#33593071)
The article explains that:
>On my laptop it takes about 20ms to do the search above with 16 characters - but by doubling the input string size to 32 characters, it takes over 12 minutes to finish. Exponential running time really does suck.
I checked with 32 characters on regex101, and it says "Match 1 halted after 119986 step(s)" when you click the debug icon (click the message above the regex input box).
I tested few other on regex101.com and none of them ran longer than a millisecond or two