[Python-bugs-list] [Bug #114660] sre hangs with "collapse whitespace" RE
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 17 Sep 2000 17:38:55 -0700
Bug #114660, was updated on 2000-Sep-17 17:38
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: sre hangs with "collapse whitespace" RE
Details: In Python 1.5.2, 1.6, and 2.0b1 using "pre", the following regex substitution works fine:
>>> s = "hello there how are you?"
>>> re.sub (r'(\S)\s+(\S)', r'\1 \2', s)
'hello there how are you?'
But in 2.0b1 using the standard "re" module, Python goes into an apparently infinite loop. (CPU is pegged, memory doesn't increase at all.)
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=114660&group_id=5470