[issue1647489] zero-length match confuses re.finditer()

2018-03-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue1647489] zero-length match confuses re.finditer()

2017-12-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 70d56fb52582d9d3f7c00860d6e90570c6259371 by Serhiy Storchaka in branch 'master': bpo-25054, bpo-1647489: Added support of splitting on zerowidth patterns. (#4471)

[issue1647489] zero-length match confuses re.finditer()

2017-12-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +4587 ___ Python tracker ___

[issue1647489] zero-length match confuses re.finditer()

2017-11-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4404 stage: -> patch review ___ Python tracker ___

[issue1647489] zero-length match confuses re.finditer()

2017-11-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Library (Lib) nosy: +ezio.melotti type: -> behavior ___ Python tracker ___

[issue1647489] zero-length match confuses re.finditer()

2017-11-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: niemeyer -> serhiy.storchaka nosy: +serhiy.storchaka versions: +Python 3.6, Python 3.7 ___ Python tracker

[issue1647489] zero-length match confuses re.finditer()

2016-11-05 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

[issue1647489] zero-length match confuses re.finditer()

2016-11-05 Thread irdb
Changes by irdb : -- nosy: +irdb ___ Python tracker ___ ___ Python-bugs-list mailing

[issue1647489] zero-length match confuses re.finditer()

2014-06-30 Thread Mark Lawrence
Mark Lawrence added the comment: How does the Regexp 2.7 engine in issue 2636 from msg73742 deal with this situation? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1647489

[issue1647489] zero-length match confuses re.finditer()

2013-04-18 Thread Martin Morrison
Martin Morrison added the comment: This is still an issue today: import re [m.groups() for m in re.finditer(r'(^z*)|(\w+)', 'abc')] [('', None), (None, 'bc')] -- nosy: +isoschiz ___ Python tracker rep...@bugs.python.org

[issue1647489] zero-length match confuses re.finditer()

2011-04-02 Thread Denver Coneybeare
Denver Coneybeare denver.coneybe...@gmail.com added the comment: I just re-tested this issue in trunk at changeset 053bc5ca199b and the issue is still exactly reproducible as originally reported. That is, the match to the empty string skips a character of the match: import re [m.groups()

[issue1647489] zero-length match confuses re.finditer()

2008-09-25 Thread Jeffrey C. Jacobs
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment: Perl gives this result for your new expression: ,undef,undef undef,undef,abc undef,,undef I think it has to do with not thinking of a string as a sequence of characters, but as a sequence of characters separated by null-space. Null-space

[issue1647489] zero-length match confuses re.finditer()

2008-09-25 Thread Matthew Barnett
Matthew Barnett [EMAIL PROTECTED] added the comment: I have to report that the fix appears to be successful: print [m.groups() for m in re.finditer(r'(^z*)|(\w+)', 'abc')] [('', None), (None, 'abc')] print re.findall(r(^z*)|(\w+), abc) [('', ''), ('', 'abc')] print [m.groups() for m in

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Matthew Barnett
Matthew Barnett [EMAIL PROTECTED] added the comment: This also affects re.findall(). -- nosy: +mrabarnett ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1647489 ___

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Jeffrey C. Jacobs
Changes by Jeffrey C. Jacobs [EMAIL PROTECTED]: -- nosy: +timehorse ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1647489 ___ ___ Python-bugs-list

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Matthew Barnett
Matthew Barnett [EMAIL PROTECTED] added the comment: What should: [m.groups() for m in re.finditer(r'(^z*)|(^q*)|(\w+)', 'abc')] return? Should the second group also yield a zero-width match before the third group is tried? I think it probably should. Does Perl?

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Jeffrey C. Jacobs
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment: Hmmm. This strikes me as a bug, beyond the realm of Issue 3262. The two items may be related, but the dropping of the 'a' seems like unexpected behaviour that I doubt any current code is expecting to occur. Clearly, what is going on is

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Jeffrey C. Jacobs
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment: Never mind inclusion in 2.6 as no-one has repeated this bug in re-world examples yet so it's going to have to wait for the Regexp 2.7 engine in issue 2636. -- versions: +Python 2.7 -Python 2.5

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Jeffrey C. Jacobs
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment: Ah, I see the problem, if ptr is not incremented, then it will keep matching the first expression, (^z*), so it would have to both 'skip' the 'a' and NOT skip the 'a'. Hmm. You're right, Matthew, this is pretty complicated. Now, for your

[issue1647489] zero-length match confuses re.finditer()

2008-09-24 Thread Matthew Barnett
Matthew Barnett [EMAIL PROTECTED] added the comment: What about r'(^z*)|(q*)|(\w+)'? I could imagine that the first group could match only at the start of the string, but if the second group doesn't have that restriction then it could match the second time, and only after that could the third

[issue1647489] zero-length match confuses re.finditer()

2008-04-24 Thread Russ Cox
Changes by Russ Cox [EMAIL PROTECTED]: -- nosy: +rsc _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1647489 _ ___ Python-bugs-list mailing list Unsubscribe: