note 71798 deleted from function.preg-match by colder
| From: | colder@php.net | Date: | Mon, 18 Jun 2007 18:34:07 +0000 |
| Subject: | note 71798 deleted from function.preg-match by colder | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127639@lists.php.net to get a copy of this message | ||
Note Submitter: Chortos-2 <chortos at inbox dot lv>
----
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.