function html2ubb(str)
if str<>"" and not isnull(str) then
dim re
set re=new regexp
re.ignorecase =true
re.global=true
re.pattern="(on(load|click|dbclick|mouseover|mouseout|mousedown|mouseup|mousewheel|keydown|submit|change|focus)=""[^""]+"")"
str = re.replace(str, "")
re.pattern="((name|id|class)=""[^""]+"")"
str = re.replace(str, "")
re.pattern = "(]*?>([\w\w]*?)<\/s+cript>)"
str = re.replace(str, "")
re.pattern = "(]*?>([\w\w]*?)<\/iframe>)"
str = re.replace(str, "")
re.pattern = "(
<\/p>)"
str = re.replace(str, "")
're.pattern = "<(\w*) class\s*=\s*([^>|\s]*)([^>]*)>"
'str = re.replace(str,"<$1$3>")
set re=nothing
html2ubb = str
else
html2ubb = ""
end if
end function