I need to find the first occurance of a colon ':' and take the complete string before that and append it to a link.
e.g.
username: @twitter nice site! RT www.google.com : visited!
needs to be converted to:
<a href="http://twitter.com/username">username</a>: nice site! RT www.google.com : visited!
I've already got the following regex that converts the string @twitter to a clickable URL:
E.g.
$description = preg_replace("/@(\w+)/", "<a href=\"http://www.twitter.com/\\1\" target=\"_blank\">@\\1</a>", $description);
Any ideas : )