%
Function makeOutput(str)
Set regExp = New regexp
regExp.Global = true
regExp.IgnoreCase = true
regExp.Pattern = "((?:mailto\:|(?:news|(?:ht|f)tp(?:s?))\://){1}\S+)"
str = regExp.Replace(str, "$1")
regExp.Pattern = "\[url=(.*)\](.*)\[/url\]"
makeOutput = regExp.Replace(str, "$2")
End Function
strText = "Detta är då bara text, åsså en länk http://www.webforum.nu, sedan kommer en till [url=www.webforum.nu]LÄNK[/url] osså.."
Response.Write makeOutput(strText)
%>