Message121484
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. |
|
Date |
User |
Action |
Args |
2010-11-18 18:37:33 | mrabarnett | set | recipients:
+ mrabarnett, ezio.melotti, verdy_p, davidchambers |
2010-11-18 18:37:33 | mrabarnett | set | messageid: <1290105453.15.0.465884147524.issue7132@psf.upfronthosting.co.za> |
2010-11-18 18:37:31 | mrabarnett | link | issue7132 messages |
2010-11-18 18:37:30 | mrabarnett | create | |
|