[issue43686] re.match appears to hang with certain combinations of pattern and string

Dennis Sweeney report at bugs.python.org
Thu Apr 1 00:12:25 EDT 2021


Dennis Sweeney <sweeney.dennis650 at gmail.com> added the comment:

It's well-known that regular expressions can take exponential time. You can try searching this bug tracker for "re exponential". Common suggestions are to try a third-party module, or to write better regexes where possible. Note that the important bits of the re module are already implemented in C:

https://github.com/python/cpython/blob/master/Modules/_sre.c

----------
nosy: +Dennis Sweeney

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43686>
_______________________________________


More information about the Python-bugs-list mailing list