#36666 [Opn->Bgs]: Wrninig: Compilation failed: lookbehind assertion is not fixed length

From: Date: Thu, 09 Mar 2006 20:02:22 +0000
Subject: #36666 [Opn->Bgs]: Wrninig: Compilation failed: lookbehind assertion is not fixed length
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-94109@lists.php.net to get a copy of this message
ID: 36666 Updated by: mike@php.net Reported By: lacak at users dot sourceforge dot net -Status: Open +Status: Bogus Bug Type: *Regular Expressions Operating System: Windows 98 PHP Version: 5.1.2 New Comment: This is a libpcre bug, please report it there: http://sourceforge.net/projects/pcre/ Previous Comments: ------------------------------------------------------------------------ [2006-03-09 13:56:34] lacak at users dot sourceforge dot net Description: ------------ It seems like bug in evaluation regular expresion in preg_match() function. See code. Reproduce code: --------------- /* 1. this produces warning */ 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 Case 2 without warning ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36666&edit=1

« previous php.bugs (#94109) next »