Closed
Description
Documentation
The documentation for re.Match.__getitem__
only shows example of using positional capture groups (like matchobj[1]
) but not named groups (like matchobj['foo']
).
It mentions that "[...] is identical to m.group(g)" so you can infer that named groups work, but I think having an explicit example would encourage the adoption of the feature.