Re: strip comments from HTML?

From: Date: Thu, 06 May 2004 12:13:06 +0000
Subject: Re: strip comments from HTML?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-185516@lists.php.net to get a copy of this message
Hi, Thursday, May 6, 2004, 3:02:16 PM, you wrote: JF> Hi, JF> This isn't working: JF> $text = preg_replace('/<!--(.*)-->/','',$text); JF> Can someone advise what characters I need to escape, or whatever to get JF> it going? JF> TIA JF> --- JF> Justin French JF> http://indent.com.au you may need '/<!--.*?-->/s' if your comment spans lines -- regards, Tom

« previous php.general (#185516) next »