[issue1647489] zero-length match confuses re.finditer()
Denver Coneybeare
report at bugs.python.org
Sun Apr 3 03:59:24 CEST 2011
Denver Coneybeare <denver.coneybeare at 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() for m in re.finditer(r'(^z*)|(\w+)', 'abc')]
[('', None), (None, 'bc')]
----------
nosy: +denversc
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1647489>
_______________________________________
More information about the Python-bugs-list
mailing list