[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

Matthew Barnett report at bugs.python.org
Sat Nov 20 02:43:20 CET 2010


Matthew Barnett <python at mrabarnett.plus.com> added the comment:

issue2636-20101120.zip is a new version of the regex module.

The match object now supports additional methods which return information on all the successful matches of a repeated capture group.

The API was inspired by that of .Net:

    matchobject.captures([group1, ...])

        Returns a tuple of the strings matched in a group or groups. Compare with matchobject.group([group1, ...]).

    matchobject.starts([group])

        Returns a tuple of the start positions. Compare with matchobject.start([group]).

    matchobject.ends([group])

        Returns a tuple of the end positions. Compare with matchobject.end([group]).

    matchobject.spans([group])

        Returns a tuple of the spans. Compare with matchobject.span([group]).

----------
Added file: http://bugs.python.org/file19651/issue2636-20101120.zip

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2636>
_______________________________________


More information about the Python-bugs-list mailing list