<%
function striphtml(strhtml)
'strips the html tags from strhtml
dim objregexp, stroutput
set objregexp = new regexp
objregexp.ignorecase = true
objregexp.global = true
objregexp.pattern = "<.+?>"
'replace all html tag matches with the empty string
stroutput = objregexp.replace(strhtml, "")
'replace all < and > with < and >
stroutput = replace(stroutput, "<", "<")
stroutput = replace(stroutput, ">", ">")
striphtml = stroutput 'return the value of stroutput
set objregexp = nothing
end function