On Tuesday 03 April 2001 19:57, you wrote:
> I was interested in stripping the content between the tags too though.
> the content between the tags is allways 18 char so I did this.
>
>    $article_body = ereg_replace("<image+>.{18}</image> ", '',
> $article_body);
>
> that seemed to work. oi, regex is bad stuff, haha.

$body = preg_replace ('/<image[^>]*>.*?</image>/i', '', $body);

is a bit more robust.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

CPU not found. retry, abort, ignore?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to