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

Page principale
Supprimer ce message
Auteur: Philip Hazel
Date:  
À: mavvma
CC: pcre-dev
Sujet: Re: [pcre-dev] Is DEFINE replaceable with smaller construct?
On Wed, 7 Jan 2009, mavvma@??? wrote:

> ...(?(DEFINE)(?<a>...)(?<b>...))...
> ...(?:(?<a>...)(?<b>...)){0}...
> Where is difference?


There probably isn't much, except that (DEFINE) makes it clear exactly
what is happening. PCRE does compile slightly different code, but I
don't think it would make any difference to the performance. (The Perl
documentation says

Similar in spirit to "(?{0})" but more efficient.

so it looks as if it does make a difference in Perl.

Philip

--
Philip Hazel