1

https://www.regular-expressions.info/recursebacktrack.html

Section - "Palindromes of any length in Perl and Ruby"

http://prntscr.com/i06qas

"PCRE, however, does not backtrack into the third recursion. It does backtrack over the third recursion when it backtracks the first alternative in the second recursion."

What does "it does backtrack over the third recursion" mean? The "over" part...

1 Answer 1

1

Over means skip.

In simple words it means PCRE won't return again into third recursion to try a zero-length match after backtracking into second side of alternative of third recursion. It exits as soon as second side of alternative is satisfied without being worry about ? quantifier that may lead into skipping a literal character match as well.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.