Re: Re: strip comments from HTML?
| From: | John W. Holmes | Date: | Fri, 07 May 2004 02:11:00 +0000 |
| Subject: | Re: Re: strip comments from HTML? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185582@lists.php.net to get a copy of this message | ||
Justin French wrote:
$text = preg_replace('/<!--.*-->/su','',$text);Just for the record, it should be a capital 'U' for ungreedy. Lowercase 'u' is something else. :) -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.comDid not work (was too greedy, matched multiple comments)