I am retrieving long text fields from a database that contain URL's. Can anyone help me find a RegEx pattern for 'activating' these URL's? I've looked for ages online but none of the examples seem to work.
I need to recognise URL's with and without the protocol.
Here's what I'm using but it doesn't work:
Public NotInheritable Class Links
Public Shared Function ActivateURLs(ByVal inputText As String) As String
Dim urlregex As New Regex("((ht|f)tp(s?)\:\/\/|~/|/)?([\w]+:\w+@)?([a-zA-Z]{1}([\w\-]+\.)+([\w]{2,5}))(:[\d]{1,5})?((/?\w+/)+|/?)(\w+\.[\w]{3,4})?((\?\w+(=\w+)?)(&\w+(=\w+)?)*)", RegexOptions.IgnoreCase Go to the complete details ...