newbie regex question..
| From: | Kelly Meeks | Date: | Wed, 10 Jul 2002 16:52:39 +0000 |
| Subject: | newbie regex question.. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-106871@lists.php.net to get a copy of this message | ||
Hi folks,
I'm trying my hand at some pattern matching, and I have a question.
I need to take all the text between the title tags of a page, and replace it. This I can do, with
the following:
$fixedfile=ereg_replace("<title>.*</title>","<title><? echo
\$bstitle; ?></title>", $fixedfile);
works like a charm....
Now I want to delete everything in the src section of an image tag, so I'm trying this:
$fixedfile=ereg_replace("src=\".*\">","src=\"<!---image goes
here--->\"", $fixedfile);
but this doesn't work.
What am I doing wrong?
Kelly