note 29294 added to function.ereg-replace
| From: | aiwanow at rack1 dot php dot net | Date: | Sun, 09 Feb 2003 01:57:57 +0000 |
| Subject: | note 29294 added to function.ereg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-43667@lists.php.net to get a copy of this message | ||
Remark to posting about HTML comments:
---
If you wish to remove/get all the comments from a HTML string I think that this reg. ex. could come
in handy :
'<!--([^-]*([^-]|-([^-]|-[^>])))*-->'
---
More simple and common solution could be:
<!--(.(?!<!--))*-->
Regards.
--
http://www.php.net/manual/en/function.ereg-replace.php
http://master.php.net/manage/user-notes.php?action=edit+29294
http://master.php.net/manage/user-notes.php?action=delete+29294
http://master.php.net/manage/user-notes.php?action=reject+29294