regex question

Thomas Jollans t at
Fri Jul 29 16:36:18 EDT 2011

On 29/07/11 19:52, Rustom Mody wrote:
> MRAB wrote:
> > 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 list of
> > strings (what the regex matched) if there are no groups.
> Thanks.
> It would be good to put this in the manual dont you think?
It is in the manual.
> 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 sections)
> "If more than one match/search is required use findall"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list