-
Notifications
You must be signed in to change notification settings - Fork 49
Require unique names for named captures #264
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Note that there is a mode |
A slight relaxation of requiring unique names for captures would be to only allow a name to correspond to a single capture index. This would be following the advice given here, and would be consistent with how captures are available in Tuple outputs.
|
@hamishknight are we tracking branch reset groups anywhere? I believe we were parsing them but I don't know if we implemented renumbering logic or not. |
They're in #370 |
According to regex101, PCRE2 requires a unique name for each capture, but the current implementation of
Regex.init(compiling:)
doesn't throw an error when there's duplicate names.The text was updated successfully, but these errors were encountered: