Author mrabarnett
Recipients davidchambers, ezio.melotti, mrabarnett, verdy_p
Date 2010-11-18.18:37:30
SpamBayes Score 0.0010669
Marked as misclassified No
Message-id <1290105453.15.0.465884147524.issue7132@psf.upfronthosting.co.za>
In-reply-to
Content
Earlier this week I discovered that .Net supports repeated capture and its API suggested a much cleaner approach than what Perl offered, so I'll be adding it to the regex module at:

    http://pypi.python.org/pypi/regex

The new methods will follow the example of .group() & co.

Given a match object m, m.group(i) returns the last match of group i (or None if there's no match), so I'll be adding m.captures(i) to return a tuple of the captures (an empty tuple if there's no match). I'll also be adding m.starts(i), m.ends(i) and m.spans(i).

The issue for this work is #2636.

Units tests are welcome.
History
Date User Action Args
2010-11-18 18:37:33mrabarnettsetrecipients: + mrabarnett, ezio.melotti, verdy_p, davidchambers
2010-11-18 18:37:33mrabarnettsetmessageid: <1290105453.15.0.465884147524.issue7132@psf.upfronthosting.co.za>
2010-11-18 18:37:31mrabarnettlinkissue7132 messages
2010-11-18 18:37:30mrabarnettcreate