jamadden / mrab-regex-hg

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

regex.search("(\\1xx|){6}", "xx", flags=regex.V1).span(0,1) returns incorrect value #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
>>> import regex
>>> print(regex.search("(\\1xx|){6}", "xx", flags=regex.V1).span(0,1))
((0, 0), (0, 0))
>>>

What is the expected output? What do you see instead?
>>> import regex
>>> print(regex.search("(\\1xx|){6}", "xx", flags=regex.V1).span(0,1))
((0, 2), (2, 2))
>>>

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

Please provide any additional information below.
The following works fine for me.

>>> import regex
>>> print(regex.search("(\\1xx|){1}", "xx", flags=regex.V1).span(0,1))
((0, 0), (0, 0))
>>> print(regex.search("(\\1xx|){2}", "xx", flags=regex.V1).span(0,1))
((0, 2), (0, 2))
>>> print(regex.search("(\\1xx|){3}", "xx", flags=regex.V1).span(0,1))
((0, 2), (2, 2))
>>> print(regex.search("(\\1xx|){4}", "xx", flags=regex.V1).span(0,1))
((0, 2), (2, 2))
>>> print(regex.search("(\\1xx|){5}", "xx", flags=regex.V1).span(0,1))
((0, 2), (2, 2))
>>>

Original issue reported on code.google.com by msm...@gmail.com on 28 Jan 2012 at 8:05

GoogleCodeExporter commented 9 years ago
Fixed in regex 0.1.20120128.

Original comment by re...@mrabarnett.plus.com on 28 Jan 2012 at 11:41