Skip to content

Support PCRE MARK verb #11320

Open
Open
@Blacksmoke16

Description

https://www.pcre.org/original/doc/html/pcrepattern.html and search for Recording which path was taken. Would need to add some additional bindings to LibPCRE and expose this value via MatchData#mark. Something like:

match = /X(*:A)Y|X(*:B)Z/.match("XZ").not_nil!
match.mark # => "B"

Related to #8199, one con of this would be locking us into PCRE, given I'm not so sure other engines support it. However maybe #3852 would fix it by optimizing the regex to be more performant?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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