[issue22353] re.findall() documentation lacks information about finding THE LAST iteration of repeated capturing group (greedy)

Mateusz Dobrowolny report at bugs.python.org
Mon Sep 8 12:15:45 CEST 2014


Mateusz Dobrowolny added the comment:

The official help
https://docs.python.org/3/library/re.html?highlight=findall#re.findall
in fact contains more information, especially the one mentioned in http://bugs.python.org/issue3384.

Regarding my issue - I am afraid it was my misunderstanding, because it looks like Regular Expressions return always LAST match and Python re.findall reutrns what it is said to be: the list of groups.
And since I repeat a captured group, I get only the last match.

More here for example here:
http://www.regular-expressions.info/captureall.html

I was learning regexp yesterday, and first I reported this without knowing everytnig about capturing groups.

If returning the last match for repeting a capturing group is defined within RegEx itself, than there is no need to mention it in Python documentation...

----------

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


More information about the Python-bugs-list mailing list