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

I have committed a patch that fixes this bug. It was nothing to do with 
DEFINE. It was an "off-by-one" bug when looking for the forward
reference to the "word" subpattern: elements such as [^m] (with only one
character) were not being correctly skipped. A simpler pattern that also
fails is:

(?&A)(([m])(?<A>))

The fix will be in the next release.

Philip

-- 
Philip Hazel

-- 
## List details at http://lists.exim.org/mailman/listinfo/pcre-dev 

Reply via email to