forked from axiak/pyre2
-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
Since Python 3.6, the re.Match object has a __getitem__ method which simply passes through to .group() and allows for accessing groups by subscripting: https://docs.python.org/3/library/re.html#re.Match.__getitem__
re2.Match currently does not support this:
>>> import re2
>>> m = re2.match('.', 'abc')
>>> m[0]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 're2.Match' object is not subscriptable
Metadata
Metadata
Assignees
Labels
No labels