Re: [pcre-dev] A pattern-matching detail: opinions sought

Top Page
Delete this message
Author: Thorsten Schöning
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] A pattern-matching detail: opinions sought
Guten Tag Philip Hazel,
am Mittwoch, 21. September 2011 um 18:09 schrieben Sie:

>    Consider the pattern ^A(B(*THEN)C), where A, B, and C are
>    complex patterns. If matching fails in C, do you expect that    
>    (a) the entire match should fail, or
>    (b) the matching should backtrack into A?  


Regarding to perlre I would expect (b), too, because the difference
between THEN and RPUNE seems to be the possibility to backtrack vs.
aborting the match, regarding of context and if there is something to
backtrack. In your example there is.

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning
AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig

Telefon: Potsdam: 0331-743881-0
E-Mail:  tschoening@???
Web:     http://www.am-soft.de


AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam
Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow