Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Optional Feature: backtracking is sub-calls #375

@User4martin

Description

@User4martin
  IsMatching('Recursive', '^(?''A''(?:b[^b]+(?&A)?x+))', 'baaabaaaaaxx', [1,12,  1,12]);

https://regex101.com/r/g3pDSW/1

^(?'A'
  (?:
    b[^b]+
    (?&A)?  ## This sub-call will match ALL the "x", but when the outer match fails, it backtracks, and matches only ONE "x"
     x+
  )
)

TRegExpr fails to match, because it does not backtrack the sub-call.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions