>Gregory Adam posted a RegEx expression you can use and which is bullet proof.
It is not about a function that would be bullet proof. It just cannot be done because there are too many variations and no matter the logic that could be applied, there are always situations where this shouldn't be a link and where it should. This character shouldn't even be used at all in URL.