[issue2636] Adding a new regex module (compatible with re)

Matt Chaput report at bugs.python.org
Fri Sep 16 00:45:18 CEST 2011


Matt Chaput <matt at whoosh.ca> added the comment:

Not sure if this is better as a separate feature request or a comment here, but... the new version of .NET includes an option to specify a time limit on evaluation of regexes (not sure if this is a feature in other regex libs). This would be useful especially when you're executing regexes configured by the user and you don't know if/when they might go exponential. Something like this maybe:

# Raises an re.Timeout if not complete within 60 seconds
match = myregex.match(mystring, maxseconds=60.0)

----------
nosy: +mattchaput

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


More information about the Python-bugs-list mailing list