Skip to content

Captured strings of (.)(\g<1>) are same #157

@scivola

Description

@scivola

Ruby code:

p /(.)(\g<1>)/.match("AB")
# => #<MatchData "AB" 1:"B" 2:"B">

I expected the following result:

# => #<MatchData "AB" 1:"A" 2:"B">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions