[issue19994] re.match does not return or takes long time

2013-12-17 Thread Matthew Barnett

Matthew Barnett added the comment:

It takes a long time due to excessive backtracking.

The regex implementation on PyPI finishes quickly because it contains some 
extra logic to reduce the chances of that happening, but it could be tricky 
trying to incorporate that into the existing re module.

Unless someone else wants have a go, it's probably best to mark this as won't 
fix.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19994
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19994] re.match does not return or takes long time

2013-12-17 Thread Tim Peters

Tim Peters added the comment:

Closing this.  Since nobody else wants have a go over two decades so far, no 
point waiting for that ;-)

--
resolution: invalid - wont fix
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19994
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19994] re.match does not return or takes long time

2013-12-16 Thread Taesu Pyo

New submission from Taesu Pyo:

// code sampe:

import re

r = (r'(/.*)*X')
s = ''

print re.match(r, s)
print list(re.finditer(r, s))
print re.findall(r, s)

// it does not return or takes long time depends on length of 's'

--
components: Regular Expressions
messages: 206283
nosy: Taesu.Pyo, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: re.match does not return or takes long time
type: behavior
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19994
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19994] re.match does not return or takes long time

2013-12-16 Thread Tim Peters

Tim Peters added the comment:

It will always complete, but may take a very long time - this is one of many 
ways to write a regexp that can't match requiring time exponential in the 
length of the string.  It's not a bug - it's the way Python's kind of regexp 
engine works.  For detailed explanation, see Jeffrey Friedl's book Mastering 
Regular Expressions:

http://www.amazon.com/Mastering-Regular-Expressions-Jeffrey-Friedl/dp/0596528124

--
nosy: +tim.peters
resolution:  - invalid

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19994
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19994] re.match does not return or takes long time

2013-12-16 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Tim, if you made this ticket as invalid, why don't you close it? Any reason?

--
nosy: +vajrasky

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19994
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19994] re.match does not return or takes long time

2013-12-16 Thread Tim Peters

Tim Peters added the comment:

@vajrasky, I didn't close it just because the usual suspects haven't chimed 
in yet.  That is, it's a pretty common kind of report, and these usually 
attract the same kinds of comments pointing to other regexp implementations.  
So leaving it to the regexp person (whoever that may be these days) to close 
it.  But marked it as invalid so as not to give the OP false hope ;-)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19994
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com