rustompmody at gmail.com
Fri Jul 29 19:52:40 CEST 2011
> findall returns a list of tuples (what the groups captured) if there is
more than 1 group,
> or a list of strings (what the group captured) if there is 1 group, or a
> strings (what the regex matched) if there are no groups.
It would be good to put this in the manual dont you think?
Also, the manual says in the 'match' section
"Note If you want to locate a match anywhere in *string*, use search()instead."
to guard against users using match when they should be using search.
Likewise it would be helpful if the manual also said (in the match,search
"If more than one match/search is required use findall"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list