New submission from Jared Grubb:
re.match matches, but the capture groups are empty. That's not possible.
Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type help, copyright, credits or license for more information.
R. David Murray added the comment:
Wouldn't a non-greedy .* match the null string?
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16990
___
Jared Grubb added the comment:
Yes:
re.match('.*', '')
_sre.SRE_Match object at 0x107c6d308
re.match('.*?', '')
_sre.SRE_Match object at 0x107c6d370
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16990
R. David Murray added the comment:
So, group() is returning the correct value, then.
--
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16990
Jared Grubb added the comment:
You're right. My mistake. I thought match meant the full string must match,
but in Python it means the beginning must match.
Sorry for the noise.
--
___
Python tracker rep...@bugs.python.org