Re: Just a quick regular expression question!
| From: | bala | Date: | Fri, 09 Dec 2005 05:52:55 +0000 |
| Subject: | Re: Just a quick regular expression question! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-227177@lists.php.net to get a copy of this message | ||
Hi Gene...
Try this....if u have found any pbm ,mail me
$string ="This is a <a href='http://www.ur1.com'>Hyperlink</a> and this
is a <a href='http://www.ur2.com'>
Hyperlink</a>";
echo 'Before => '.$string;
$string = ereg_replace('(.*)(http:\/\/www.ur1)(.*)',
'\\1javascript:\\2\\3', $string);
echo '<br>After => '.$string;