Re: [pcre-dev] [Bug 812] Unmatched optional groups do not ma…

トップ ページ
このメッセージを削除
著者: Sheri
日付:  
To: pcre-dev
題目: Re: [pcre-dev] [Bug 812] Unmatched optional groups do not match nothing when used as backreference
Philip Hazel wrote:
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug.
>
> http://bugs.exim.org/show_bug.cgi?id=812
>
> --- Comment #1 from Philip Hazel <ph10@???> 2009-02-22 19:57:51 ---
> Although you say "other regular expressions do this", in fact, Perl does not (I
> checked with Perl 5.008008). PCRE is "Perl-compatible"; it tries to do what
> Perl does. Therefore, I do not think this is a bug. The Perl/PCRE behaviour
> seems fine to me, in any case. \1 matches "what group 1 matched", but if group
> 1 was never used, it didn't match anything - which is not (IMHO) the same thing
> as matching an empty string.
>
>
>

I thought this was why you implemented the javascript option.


Regards,
Sheri