Function LinkString(strInput)
Set objRegExpHTTP1 = New RegExp
Set objRegExpHTTP2 = New RegExp
Set objRegExpEMail = New RegExp
objRegExpHTTP1.Pattern = \"(http|ftp)(:\\/\\/[\\w\\._-]+\\.[\\w\\._-]+\\S*)\"
objRegExpHTTP2.Pattern = \"(^|[^\\/])(www[^\\.\\s]?\\.[\\w\\._-]+\\.[A-Za-z]{2,3}\\S*)\"
objRegExpEMail.Pattern = \"([\\w\\._-]+@[\\w\\._-]+\\.[A-Za-z]{2,3}\\S*)\"
objRegExpHTTP1.Global = True
objRegExpHTTP2.Global = True
objRegExpEMail.Global = True
objRegExpHTTP1.IgnoreCase = True
objRegExpHTTP2.IgnoreCase = True
objRegExpEMail.IgnoreCase = True
strOutput = objRegExpEMail.Replace(strInput, \" <a href=\'mailto:$1\'>$1</a> \")
strOutput = objRegExpHTTP1.Replace(strOutput, \" <a href=\'$1$2\' target=\'_blank\'>$1$2</a> \")
strOutput = objRegExpHTTP2.Replace(strOutput, \" <a href=\'
http://$2\' target=\'_blank\'>$2</a> \")
Set objRegExpHTTP2 = Nothing
set objRegExpHTTP1 = Nothing
Set objRegExpEMail = Nothing
LinkString = strOutput
End Function
Her en function som laver web og email adresse om til link.