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

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: NN
CC: Pcre-dev@exim.org
Subject: 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