[pcre-dev] Recursion with possessive quantifiers

Page principale
Supprimer ce message
Auteur: ND
Date:  
À: Pcre-dev
Nouveaux-sujets: Re: [pcre-dev] Recursion with possessive quantifiers
Sujet: [pcre-dev] Recursion with possessive quantifiers
Hi, Philip!

When a possessive quantifier applyed to expression for example
(?:<EXPR>)*+
then recursion occurs and its value is equal to the number of sequential
<EXPR> in input string.
Why recurtion is so big? It seems there is no need to keep all
intermediate backtrack points because PCRE have no possibility to return
to them. Perhaps PCRE need to keep only one last point for backtracking to
it if following peace of input string don't match <EXPR>.

May be this is a way for optimization?

Thanx.