Hi,
Here is a code that will work:
$body = "<a href=\"http://www.yahoo.com/\">Yahoo!</a>";
$body = eregi_replace("<a href=\"((http|mailto|ftp):\/\/[[:space:]<>]{1,})\">((.*){2,})</a>", "<a href=\"\1\">\3</a> - \1", $body);
print $body;
$body is the text that contains the link thingy. I did print $body to test it out and it works.
hope this helps,
-sridhar