Skip to content

investigate skipping reverse NFA compilation if regex is anchored #1097

Open
@BurntSushi

Description

@BurntSushi

If the regex is anchored and a match is found in the forwards direction, then the reverse NFA is never needed to find the start position because the start position must necessarily be 0 as a result of the anchor.

See this comment for a little more context: #1095 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions