[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.

[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

[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

[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

[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 ___

[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