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

Regex backreferences don't work properly #1

Open
lukasgeiter opened this issue Oct 13, 2016 · 0 comments
Open

Regex backreferences don't work properly #1

lukasgeiter opened this issue Oct 13, 2016 · 0 comments

Comments

@lukasgeiter
Copy link

I'm trying to use fastparse with a regex that contains backreferences. Here's a very simplified example:

 ("|')foo\1

However, since Fastparse joins all regexes of one state like (regex1)|(regex2)|(("|')foo\1) the reference to capturing group 1 is now wrong. Instead of ("|') it now references (regex1).

It would be great if fastparse was somehow able to support this.
I guess one option would be to match the regexes separately.

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

No branches or pull requests

1 participant