[issue30973] Regular expression "hangs" interpreter

Gareth Rees report at bugs.python.org
Thu Jul 20 07:49:54 EDT 2017


Gareth Rees added the comment:

This is the usual exponential backtracking behaviour of Python's regex engine. The problem is that the regex

    (?:[^*]+|\*[^/])*

can match against a string in exponentially many ways, and Python's regex engine tries all of them before giving up.

----------
nosy: +gdr at garethrees.org

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30973>
_______________________________________


More information about the Python-bugs-list mailing list