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; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php