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

トップ ページ
このメッセージを削除
著者: Philip Hazel
日付:  
To: mavvma
CC: pcre-dev
題目: 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