note 26232 added to function.preg-replace
| From: | nobody at none dot com | Date: | Wed, 23 Oct 2002 14:37:00 +0000 |
| Subject: | note 26232 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-38453@lists.php.net to get a copy of this message | ||
The above example from my@mail doesnt seem to work. The next one does work though!
$text = preg_replace("/(<.*?)(=)(?!\"|\')(.*?)(>|[[:space:]])/is",
"\\1\\2\"\\3\"\\4",$text);
You forgot to include the < within the search and it did not see the single quotation.
Cheers Yo!
--
http://www.php.net/manual/en/function.preg-replace.php
http://master.php.net/manage/user-notes.php?action=edit+26232
http://master.php.net/manage/user-notes.php?action=delete+26232
http://master.php.net/manage/user-notes.php?action=reject+26232