New submission from Israel Tsadok:

import re
re.search(r'a(b[^b]*b|[^c])*cxxx',
'abbcacabbbbcabbbbbbcabbbbbbbbbbbbbbcacabbbbbbbbbbbbbbcabbbbcac')

perl seems to handle this just fine.

(The original problem was trying to translate some html to text:
re.sub(r'<p(?:"[^"]*"|[^>])*>(.*?)</p>', r'\1\n')

This hanged on several files. Changing [^>] to [^">] resolved my
problem, but the general case remains.)

This might be a dupe of http://bugs.python.org/issue1297193

----------
components: Regular Expressions
messages: 61739
nosy: itsadok
severity: normal
status: open
title: re.search hangs on this
versions: Python 2.5

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1946>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to