[pcre-dev] [Bug 812] Unmatched optional groups do not match …

トップ ページ
このメッセージを削除
著者: Philip Hazel
日付:  
To: pcre-dev
題目: [pcre-dev] [Bug 812] Unmatched optional groups do not match nothing when used as backreference
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=812

Philip Hazel <ph10@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID





--- 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.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email