Message399978
To produce the same results that you'd get by using the global flag in javascript regex, and make re.findall to not capture the groups exclusively, all the groups in the pattern need to be of the non-capturing (?:) type.
If the distinction about capturing and non-capturing groups is mentioned in the docs of re.findall, it would help those who have learnt regex from another language (like javascript), where the global flag in regex is allowed.
I want the docs of re.findall and re.finditer to somehow suggest the use (?:group) to return the original matches and not the captured groups. |
|
Date |
User |
Action |
Args |
2021-08-20 16:02:49 | rondevous | set | recipients:
+ rondevous, docs@python, serhiy.storchaka, veky |
2021-08-20 16:02:49 | rondevous | set | messageid: <1629475369.61.0.905551234275.issue44940@roundup.psfhosted.org> |
2021-08-20 16:02:49 | rondevous | link | issue44940 messages |
2021-08-20 16:02:49 | rondevous | create | |
|