#19 bug in evaluation regular expresion

open
nobody
None
5
2006-03-10
2006-03-10
Anonymous
No

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

Discussion

  • Logged In: NO

    This was fixed in PCRE 6.7. (Comment from PH)