note 76027 added to function.preg-match-all
| From: | phektus at gmail dot com | Date: | Wed, 27 Jun 2007 06:22:21 +0000 |
| Subject: | note 76027 added to function.preg-match-all | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128013@lists.php.net to get a copy of this message | ||
If you'd like to include DOUBLE QUOTES on a regular expression for use with preg_match_all, try
ESCAPING THRICE, as in: \\\"
For example, the pattern:
'/<table>[\s\w\/<>=\\\"]*<\/table>/'
Should be able to match:
<table>
<row>
<col align="left" valign="top">a</col>
<col align="right" valign="bottom">b</col>
</row>
</table>
.. with all there is under those table tags.
I'm not really sure why this is so, but I tried just the double quote and one or even two
escape characters and it won't work. In my frustration I added another one and then it's
cool.
----
Server IP: 69.147.83.197
Probable Submitter: 203.87.191.130
----
Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php
Edit -- https://master.php.net/note/edit/76027
Del: integrated -- https://master.php.net/note/delete/76027/integrated
Del: useless -- https://master.php.net/note/delete/76027/useless
Del: bad code -- https://master.php.net/note/delete/76027/bad+code
Del: spam -- https://master.php.net/note/delete/76027/spam
Del: non-english -- https://master.php.net/note/delete/76027/non-english
Del: in docs -- https://master.php.net/note/delete/76027/in+docs
Del: other reasons-- https://master.php.net/note/delete/76027
Reject -- https://master.php.net/note/reject/76027
Search -- https://master.php.net/manage/user-notes.php