Re: [pcre-dev] Is DEFINE replaceable with smaller construct?

Αρχική Σελίδα
Delete this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: NN
Υ/ο: Pcre-dev@exim.org
Αντικείμενο: Re: [pcre-dev] Is DEFINE replaceable with smaller construct?
On Sat, 3 Jan 2009, NN wrote:

> Is there
> (?(DEFINE)X)
> equivalent to
> X{0}


Yes, if that is the complete regex. Also equivalent to an empty string.

No, if that is part of a larger regex that refers to any group contained
within the DEFINE. Please read the "pcrepattern" man page for a
description of what DEFINE is used for.

Philip

--
Philip Hazel