eregi_replace Howto
| From: | Martin Cabrera Diaubalick | Date: | Fri, 01 Feb 2002 12:55:58 +0000 |
| Subject: | eregi_replace Howto | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-83120@lists.php.net to get a copy of this message | ||
Hello all!
I would like to change all the links containing string "microsite" from
$contenido1 to: <a href="http://www.whatever.com">Link not
available</a>.
The rest of the links of $contenido1 would have to be ontouched.
To do this, I tried
$contenido1=eregi_replace("(<a href=.*microsite.*</a>)","<a
href=\"http://www.whatever.com\">Link not
available</a>",$contenido1);
It changes links with "microsite" in it but erases the ones without microsite.
How can I make this work?
TIA
Regards