[issue1946] re.search hangs on this

2008-02-05 Thread Facundo Batista

Facundo Batista added the comment:

[EMAIL PROTECTED]:~$ time python -c "import
re;re.search(r'a(b[^b]*b|[^c])*cxxx','abbcacacabbcabbcacabbcacac')"

real0m2.510s
user0m2.308s
sys 0m0.028s
[EMAIL PROTECTED]:~$ 

This is a Python 2.5.1 (r251:54863, Oct  5 2007, 13:36:32) [GCC 4.1.3
20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2

Note that it took some seconds on my fairly fast computer... could this
be a problem, that it takes long, but does not hang?

--
nosy: +facundobatista
resolution:  -> works for me
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1946] re.search hangs on this

2008-01-29 Thread Georgij Kondratjev

Changes by Georgij Kondratjev:


--
nosy: +orivej

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1946] re.search hangs on this

2008-01-27 Thread Israel Tsadok

New submission from Israel Tsadok:

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

perl seems to handle this just fine.

(The original problem was trying to translate some html to text:
re.sub(r'])*>(.*?)', 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]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com