strip comments from HTML?
| From: | Justin French | Date: | Thu, 06 May 2004 05:02:16 +0000 |
| Subject: | strip comments from HTML? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-185496@lists.php.net to get a copy of this message | ||
Hi,
This isn't working:
$text = preg_replace('/<!--(.*)-->/','',$text);
Can someone advise what characters I need to escape, or whatever to get it going?
TIA
---
Justin French
http://indent.com.au