You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
CaptureIndex should contain info to tell if a subgroup is matched and group name on a named group.
Motivation
group name and subgroup match state are needed in some cases.
Describe alternatives you've considered
As unmatched group always has a 0 start position and 0 lengths. So when full-match is not started at 0, comparing subgroup start with full-match start can tell if there is a match. but that does not solve the case when full-match starts at 0. And 0 length(anchor alike) subgroup will have 0 lengths, so testing length against 0 can only solve none-0-length groups.
the group name can be collected by parsing pattern sources.
it would be very helpful if group name and subgroup match state can be provided by CaptureIndex.