Re: [pcre-dev] ?(DEFINE) assertion problem

Page principale
Supprimer ce message
Auteur: Philip Hazel
Date:  
À: ND
CC: Pcre-dev
Sujet: Re: [pcre-dev] ?(DEFINE) assertion problem
On Sat, 1 Aug 2009, ND wrote:

> Pattern:
> (?&word)(?&element)(?(DEFINE)(?<element><[^m][^>]>[^<])(?<word>\w*+))
> Compilation error:
> reference to non-existent subpattern at 8 position
>
> Substitute 'm' with '\d' in pattern string :
> (?&word)(?&element)(?(DEFINE)(?<element><[^\d][^>]>[^<])(?<word>\w*+))
> Compilation:
> OK
>
> What's wrong with the first example?


Nothing. You have found a bug in PCRE. The latest release (7.9) gives
the error "internal error: previously-checked referenced subpattern not
found at offset 69" rather than the message you got, but it's still
wrong.

Thank you for the report. I have noted it for fixing when I next work on
PCRE, which is likely to be in a few weeks' time.

Philip

--
Philip Hazel