note 17347 rejected from function.preg-match by zak

From: Date: Thu, 06 Dec 2001 11:40:03 +0000
Subject: note 17347 rejected from function.preg-match by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21691@lists.php.net to get a copy of this message
Please Note if you plan to use \ you can not escape it with \\. Example not working: print preg_match("@^(.*[^\\])([\\]*)(['\"])(.*)$@sU", 'here is no matching string' , $match) ? 'ok' : 'nope'; ... will print 'ok' (should be nope) Example working: print preg_match("@^(.*[^\x5c\x5c])([\x5c\x5c]*)(['\"])(.*)$@sU", "here is no matching string" , $match) ? 'ok' : 'nope'; ... will print 'nope' -- i don't know why is that and actually it appears to be strange to me

« previous php.notes (#21691) next »