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!
Direct answer to your question:
$string = preg_replace('/^(.*?):/', '$1:', $string);
But I assume that you are parsing twitter RSS or something similar. So you can just use /^(\w+)/.
/^(\w+)/