Re: [pcre-dev] Assertions with quantifier behaviour is Perl

Pàgina inicial
Delete this message
Autor: Philip Hazel
Data:  
A: ND
CC: Pcre-dev
Assumpte: Re: [pcre-dev] Assertions with quantifier behaviour is Perl
On Mon, 2 May 2011, ND wrote:

> And then you meet another compatibility problem:
> PCRE unlike Perl don't capture subpatterns in assertions-conditions.


What is already documented is this:

3. Capturing subpatterns that occur inside negative lookahead
assertions are counted, but their entries in the offsets vector are
never set. Perl sets its numerical variables from any such patterns
that are matched before the assertion fails to match something
(thereby succeeding), but only if the negative lookahead assertion
contains just one branch.

I will take a look at assertion conditions; if it is not hard, it would
be more consistent to make them the same, I suppose. I will in any case
document the behaviour for the next release.

Philip

--
Philip Hazel