Matthew Barnett <[email protected]> added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7132>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com