Re: strip from <html to closing body tag
| From: | Jimmy | Date: | Mon, 07 Jan 2002 11:40:19 +0000 |
| Subject: | Re: strip from <html to closing body tag | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-79677@lists.php.net to get a copy of this message | ||
Hi WB,
> Hi i need to strip out the <html> up to the <body> tag.
> preg_replace( "/<html(.*)body(.*)>" , " " , $body );
try this:
preg_replace( "/<html>[^<body>]*<body[^>]*>/" , " " , $body
);
--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your mind is like parachute. It works best when it is open.