note 42524 deleted from function.eregi-replace by nlopess
| From: | nlopess@php.net | Date: | Thu, 20 May 2004 14:45:51 +0000 |
| Subject: | note 42524 deleted from function.eregi-replace by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-69873@lists.php.net to get a copy of this message | ||
Note Submitter: greg.bialowas [at] interia.pl
----
I wanted to add special formatting where company name is printed on user's site, eg.
<span class=\"blue\">Company</span><span
class=\"orange\">Name</span><span
class=\"blue\">.com</span>
but!
it would also affect all http://www.companyname.com,
http://companyname.com and all mailto:info@companyname.com. so here is the piece of coding
to avoid this:
$var = eregi_replace("[^\.\@][:space:]?companyname.com ", " <span
class=\"blue\">Company</span><span
class=\"orange\">Name</span><span
class=\"blue\">.com</span> ", $var);
GreG