I don't understand this regex.groups() behaviour

Fredrik Lundh fredrik at pythonware.com
Fri Jun 13 22:30:54 CEST 2003

Grzegorz Adam Hankiewicz wrote:

> I don't understand why the last two sentences of the following
> interactive session don't return more than two groups.

because there are only two group markers in your expression,
of course.

if you want multiple matches, use findall.


More information about the Python-list mailing list