regexp problem
| From: | Taylor York | Date: | Thu, 10 Jul 2003 18:25:31 +0000 |
| Subject: | regexp problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-154767@lists.php.net to get a copy of this message | ||
First,
I need the code to replace the link in a string, like
<BASE HREF="www.google.com"> with <BASE HREF="mystring">
ereg_replace("'<BASE HREF=\"'(.*)'\">'",
"'<BASE HREF=\"$my_string\">'",
$old);
That was the closest i got, but (.*) makes it take the first BASE HREF, and
the last ">, which sucks.
Can anyone help?
Second,
I hate asking for help on Regexps...I would like a tutorial online that
steps me through one method of them at a time, and then lets me move
on...kindof like math. You have to know the basics befor you can get
advanced. Any help there either?