#35944 [Opn]: preg_match("/[^\\]/si",$string) or preg_match("/\\/si",$string) ecc don't works

From: Date: Mon, 09 Jan 2006 13:33:40 +0000
Subject: #35944 [Opn]: preg_match("/[^\\]/si",$string) or preg_match("/\\/si",$string) ecc don't works
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-91680@lists.php.net to get a copy of this message
ID: 35944 User updated by: gidanmx2 at gmail dot com Reported By: gidanmx2 at gmail dot com Status: Open Bug Type: *Regular Expressions Operating System: Windows XP PHP Version: 5.1.1 New Comment: Sorry, the Expected result is Not found not found, I have mistaken to write :P Previous Comments: ------------------------------------------------------------------------ [2006-01-09 14:26:42] gidanmx2 at gmail dot com Description: ------------ The preg_match can't found [^\\]. Reproduce code: --------------- $stringa = "\{test\}"; if(preg_match("/[^\\]/i",$stringa,$matches)){ echo "<p>Found"; } else { echo "<p>Not found"; } Expected result: ---------------- Found Actual result: -------------- Warning: preg_match() [function.preg-match]: Compilation failed: missing terminating ] for character class at offset 4 in C:\Documents and Settings\XPuser\Documenti\Eucalyptus\test.php on line 26 Not found ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35944&edit=1

« previous php.bugs (#91680) next »