This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年09月13日 20:30 by triuan, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg276336 - (view) | Author: triuan (triuan) | Date: 2016年09月13日 20:30 | |
https://docs.python.org/2/library/re.html error: ...string 'aaaaaa', a{3,5} will match 5 'a' characters... suggest correction: ...string 'aaaaaa', a{5} will match 5 'a' characters... |
|||
| msg276338 - (view) | Author: triuan (triuan) | Date: 2016年09月13日 20:34 | |
https://docs.python.org/2/library/re.html error: ...string 'aaaaaa', a{3,5} will match 5 'a' characters... suggest correction 2: ...string 'aaaaaa', a{3, 5} will match 3 to 5 'a' characters... |
|||
| msg276340 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2016年09月13日 20:40 | |
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'
|
|||
| msg276362 - (view) | Author: triuan (triuan) | Date: 2016年09月13日 23:57 | |
thanks! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:36 | admin | set | github: 72323 |
| 2016年09月13日 23:57:43 | triuan | set | messages: + msg276362 |
| 2016年09月13日 20:43:06 | SilentGhost | set | status: open -> closed resolution: not a bug type: behavior stage: resolved |
| 2016年09月13日 20:40:41 | christian.heimes | set | nosy:
+ christian.heimes messages: + msg276340 |
| 2016年09月13日 20:34:16 | triuan | set | messages: + msg276338 |
| 2016年09月13日 20:30:12 | triuan | create | |