Serhiy Storchaka added the comment:

Minimal example for your case is

re.match(r'(\w+\s*)+\s+\d+', 'Compiling Regular Patterns to Sequential 
Machines')

It doesn't halt, it just needs too long time to finish. Your should rewrite the 
regular expression to avoid catastrophic backtracking 
(http://www.regular-expressions.info/catastrophic.html). For example rewrite 
the start of your expression as

re.match(r'\w[\w\s]*\s\d+', 'Compiling Regular Patterns to Sequential Machines')

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23541>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to