note 42524 added to function.eregi-replace

From: Date: Thu, 20 May 2004 01:37:44 +0000
Subject: note 42524 added to function.eregi-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-69856@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.eregi-replace.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42524 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42524&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42524&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69856) next »