On Sat, 1 Jun 2002 16:56:04 +0100, you wrote:

>Hi,
>I've never used a reg exp, but I was trying to do something simple, and I just can't 
>seem to do it :)
>
>I have a varible $fdata which contains the contents of a webpage, and I want to strip 
>out the <base> tag.
>
>I try:
>$fdata = preg_replace("<base.*>","",$fdata);
>
>But its stripping out everything between the first "<base" and the last ">" on that 
>line, instead of the of the ">" at the end of the base tag

Try this (untested):

$fdata = preg_replace ("/<base[^>]*>/","",$fdata);

That should work.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to