#38327 [Opn->Asn]: False notice: lookbehind assertion is not fixed length

From: Date: Fri, 04 Aug 2006 14:17:45 +0000
Subject: #38327 [Opn->Asn]: False notice: lookbehind assertion is not fixed length
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100346@lists.php.net to get a copy of this message
ID: 38327 Updated by: tony2001@php.net Reported By: php dot net at bokehman dot com -Status: Open +Status: Assigned Bug Type: PCRE related Operating System: win32 PHP Version: 5.1.4 -Assigned To: +Assigned To: andrei Previous Comments: ------------------------------------------------------------------------ [2006-08-04 13:37:10] php dot net at bokehman dot com <?php echo preg_replace('/(?<=[^x])/', '.', 'wx'); ?> Error message: Warning: preg_replace() [function.preg-replace]: Compilation failed: lookbehind assertion is not fixed length at offset 8 ------------------------------------------------------------------------ [2006-08-04 12:45:16] tony2001@php.net Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2006-08-04 12:28:29] php dot net at bokehman dot com Description: ------------ The regex posted below is legal and fixed length but raises the following warning: lookbehind assertion is not fixed length Situation: negative lookbehind contains a negated character class. This bug makes it impossible to use a negated character class anywhere within a negative lookbehind. Reproduce code: --------------- $regex = '/(?<=[^x])/'; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38327&edit=1

« previous php.bugs (#100346) next »