Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Regex backreferences don't work properly #1

@lukasgeiter

Description

@lukasgeiter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions