[docs] [issue28136] RegEx documentation error

Christian Heimes report at bugs.python.org
Tue Sep 13 16:40:41 EDT 2016


Christian Heimes added the comment:

The documentation is correct. It explains the difference between a default match (greedy) and a non-greedy match.

>>> re.match('(a{3,5})', 'aaaaa').group(1)
'aaaaa'
>>> re.match('(a{3,5}?)', 'aaaaa').group(1)
'aaa'

----------
nosy: +christian.heimes

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28136>
_______________________________________


More information about the docs mailing list