Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement named backreference support #388

Closed
hamishknight opened this issue May 9, 2022 · 2 comments · Fixed by #433
Closed

Implement named backreference support #388

hamishknight opened this issue May 9, 2022 · 2 comments · Fixed by #433
Assignees

Comments

@hamishknight
Copy link
Contributor

hamishknight commented May 9, 2022

Named backreferences e.g (?<x>)\k<x> are not currently supported, but it seems like we ought to be able to lookup the capture index from the capture list, and emit it the same as a numbered backreference (i.e \1).

@hamishknight
Copy link
Contributor Author

@milseman Does it seem reasonable to support this for 5.7? It would also be nice to support relative numbered captures (i.e \k<-1>), but they could probably be future work if needed (I believe we could back deploy as a regular numbered capture).

@milseman
Copy link
Collaborator

milseman commented May 9, 2022

Relative is less important than named. Let's try to get named in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants