note 17347 added to function.preg-match
| From: | root at example dot com | Date: | Wed, 05 Dec 2001 14:27:21 +0000 |
| Subject: | note 17347 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-21634@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
--
http://www.php.net/manual/en/function.preg-match.php
http://master.php.net/manage/user-notes.php?action=edit+17347
http://master.php.net/manage/user-notes.php?action=delete+17347
http://master.php.net/manage/user-notes.php?action=reject+17347