Message276340
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' |
|
Date |
User |
Action |
Args |
2016-09-13 20:40:41 | christian.heimes | set | recipients:
+ christian.heimes, docs@python, triuan |
2016-09-13 20:40:41 | christian.heimes | set | messageid: <1473799241.58.0.486918962081.issue28136@psf.upfronthosting.co.za> |
2016-09-13 20:40:41 | christian.heimes | link | issue28136 messages |
2016-09-13 20:40:41 | christian.heimes | create | |
|