<% Function Smiley(text) text = server.HTMLEncode(text) text = Replace(text, vbCrLf, "
") text = Replace(text,":-)","") text = Replace(text,":)","") Set regExp = New regexp regExp.Global = true regExp.IgnoreCase = true regExp.Pattern = "((?:mailto\:|(?:news|(?:ht|f)tp(?:s?))\://){1}\S+)" text = regExp.Replace(str, "$1") regExp.Pattern = "\[url=(.*)\](.*)\[/url\]" text = regExp.Replace(str, "$2") regExp.Pattern = "\[img](.*)\[/img\]" text = regExp.Replace(str, "") Set regExp = Nothing smiley = text End Function %> <% =Smiley(strText) %>