How do I get to *all* of the groups of an re search?
Andrew Dalke
adalke at mindspring.com
Sat Jan 11 12:52:07 EST 2003
Paul Rubin wrote:
> Something wrong with
>
> m.string[m.start(g):m.end(g)]
>
> as described in the docs?
You missed the context of this thread. He wants all text matched
by a group and not just the most recent.
Something like
matched_text = m.allmatches(1)
This is a feature most regexp libraries don't support.
Andrew
dalke at dalkescientific.com
More information about the Python-list
mailing list