[pcre-dev] ?(DEFINE) assertion problem

Αρχική Σελίδα
Delete this message
Συντάκτης: ND
Ημερομηνία:  
Προς: Pcre-dev
Αντικείμενο: [pcre-dev] ?(DEFINE) assertion problem
Hi, Philip!

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?

Regards, Michael