Jag har den här funktionen som jag hittade här på wf.
Function GetUrl(ByVal strText)
Dim mDelimit
Dim re
mDelimit = Chr(0)
Set re = New RegExp
re.Global = True
re.IgnoreCase = true
re.Pattern = "(\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+)"
strText = re.Replace(strText, "<a href=""mailto" & mDelimit & ":$1"">$1</a>")
re.Pattern = "([url]http://[/url]|[url]https://[/url]|[url]ftp://[/url]|mailto:)(\S)(\S+)"
strText = re.Replace(strText, "<a href=""$1$2" & mDelimit & "$3"" target=""_blank"">$2" & mDelimit & "$3</a>")
re.Pattern = "(www\.(\S)(\S+))"
strText = re.Replace(strText, "<a href=""http://$1"" target=""_blank"">$1</a>")
strText = Replace(strText, mDelimit, "")
GetUrl=strText
End Function
