Matthew Barnett <pyt...@mrabarnett.plus.com> added the comment:

issue2636-20090729.zip contains regex.py, _regex.h, _regex.c which will
work with Python 2.5 as well as Python 2.6, and also 2 builds of
_regex.pyd (for Python 2.5 and Python 2.6 on Windows).

This version supports accessing the capture groups by subscripting the
match object, for example:

>>> m = regex.match("(?<foo>.)(?<bar>.)", "abc")
>>> len(m)
3
>>> m[0]
'ab'
>>> m[1 : 3]
['a', 'b']
>>> m["foo"]
'a'

----------
Added file: http://bugs.python.org/file14592/issue2636-20090729.zip

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue2636>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to