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.

Author rondevous
Recipients docs@python, rondevous, serhiy.storchaka, veky
Date 2021-08-20.16:02:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629475369.61.0.905551234275.issue44940@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-08-20 16:02:49rondevoussetrecipients: + rondevous, docs@python, serhiy.storchaka, veky
2021-08-20 16:02:49rondevoussetmessageid: <1629475369.61.0.905551234275.issue44940@roundup.psfhosted.org>
2021-08-20 16:02:49rondevouslinkissue44940 messages
2021-08-20 16:02:49rondevouscreate