Meeen nu da jeg lige har en function til netop samme formål kan du da godt lige få den gratis :o)
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
smid den øverst i dit ASP script og brug den sådan her:
<%
strTxt = Replace(rs(\"BroedText\"), vbCrLf, \"<br>\")
strTxt = LinkString(strTxt)
Response.Write strTxt
%>
istedet for det tpill og jeg skrev..