Forever-Young / mrab-regex-hg

Automatically exported from code.google.com/p/mrab-regex-hg
0 stars 0 forks source link

regex.search("^(?:a?b?)*$", "ac") take a very long time. #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
>>> import regex
>>> print(regex.search("^(?:a?b?)*$", "ac"))

What is the expected output? What do you see instead?
>>> import regex
>>> print(regex.search("^(?:a?b?)*$", "ac"))
None
>>>

What version of the product are you using? On what operating system?
Windows XP Home SP3 (32-bit version)
Python 3.2.2 (default, Sep  4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win
32
regex 0.1.20120129

Please provide any additional information below.
It seems that Ver.0.1.20120126 doesn't have this issue.

Original issue reported on code.google.com by msm...@gmail.com on 29 Jan 2012 at 4:42

GoogleCodeExporter commented 9 years ago
is this a backtracking vs NDF problem?
I have experienced long running regex before, but forgot the expression..

Original comment by jfcga...@gmail.com on 29 Jan 2012 at 4:06

GoogleCodeExporter commented 9 years ago
probably not. "ac" is too short.

Original comment by msm...@gmail.com on 29 Jan 2012 at 8:52

GoogleCodeExporter commented 9 years ago
It seems that this issue fixed in regex 0.1.20120208.
Is there any reason to keep this issue open?

Original comment by msm...@gmail.com on 9 Feb 2012 at 2:20

GoogleCodeExporter commented 9 years ago
Unfortunately I overlooked this issue.

Yes, fixed in regex 0.1.20120208.

Original comment by re...@mrabarnett.plus.com on 9 Feb 2012 at 5:39