note 71798 added to function.preg-match

From: Date: Sat, 16 Dec 2006 16:29:32 +0000
Subject: note 71798 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-120653@lists.php.net to get a copy of this message
With respect to escaped backslashes, this pattern would be the one to be used rather than Elwin’s: /[^\\\](\\\\\\\)*["']/ (don’t forget to escape the appropriate quotation mark when using in real code). If escaping backslashes is not allowed, this one should do the thing: /[^\\\]["']/ The pattern supplied by Elwin matches nothing else than *any* apostrophe, quotation mark or exclamation mark. By the way, the double backslash is compiled into a single backslash by the Zend Engine, and then PCRE thinks it’s just escaping the following character, so in the end it’s completely lost. ---- Server IP: 81.94.227.69 Probable Submitter: 213.182.207.207 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match.php Edit -- https://master.php.net/note/edit/71798 Del: integrated -- https://master.php.net/note/delete/71798/integrated Del: useless -- https://master.php.net/note/delete/71798/useless Del: bad code -- https://master.php.net/note/delete/71798/bad+code Del: spam -- https://master.php.net/note/delete/71798/spam Del: non-english -- https://master.php.net/note/delete/71798/non-english Del: in docs -- https://master.php.net/note/delete/71798/in+docs Del: other reasons-- https://master.php.net/note/delete/71798 Reject -- https://master.php.net/note/reject/71798 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120653) next »