bug in evaluation regular expresion
PERL 5 regular expression pattern matching
Brought to you by:
mish_the_fish
I encounter this bug in PHP, so I posted this bug in
PHP bug list, but I was redirected here because this
is "libpcre bug".
It seems like bug in evaluation regular expresion. See
code.
Reproduce code:
---------------
/* 1. this produces warning : Compilation failed:
lookbehind assertion is not fixed length ... */
if (preg_match("/(?<![^f]oo)(bar)/i", "xoobar")>0)
echo "Match3";
/* 2. this does not produces warning */
if (preg_match("/(?<![^fo]o)(bar)/i", "xoobar")>0)
echo "Match4";
Expected result:
----------------
Case 1 without warning
Case 2 without warning
Actual result:
--------------
Case 1 with warning "Compilation failed: lookbehind
assertion is not fixed length ..."
Case 2 without warning
Logged In: NO
This was fixed in PCRE 6.7. (Comment from PH)