asp 去除HTML格式

  
Function stripHTML(strHTML)
Dim objRegExp,strOutput
Set objRegExp = New Regexp
objRegExp.IgnoreCase
= True
objRegExp.Global
= True
objRegExp.Pattern
= " <.+?> "
strOutput
= objRegExp.Replace(strHTML, "" )
stripHTML
= strOutput
Set objRegExp = Nothing
End Function 

=======================

  
' 限定100个字符串
function cutstr(tempstr,tempwid)
if len (tempstr) > tempwid then
cutstr
= left (tempstr,tempwid) & " ... "
else
cutstr
= tempstr
end if
end function

' 为图片则不显示
function cutimg(cutnew)
if instr (cutnew, " IMG " ) > 0 then
cutimg
= " ... "
else
cutimg
= cutnew
end if
end function

你可能感兴趣的:(html)