帮忙解释一下这个函数

来源:百度知道 编辑:UC知道 时间:2024/06/24 14:38:29
Function LoseHTML(strHTML)
Dim objRegExp, strOutput
Set objRegExp = New Regexp

objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<.+?>"
strHTML = strHTML & ""
if strHTML="" Then LoseHTML="":Exit Function
strOutput = objRegExp.Replace(strHTML, "")
strOutput = Replace(strOutput, "<", "<")
strOutput = Replace(strOutput, ">", ">")
strOutput = Replace(strOutput, " ", "")
LoseHTML = strOutput 'Return the value of strOutput

Set objRegExp = Nothing
End Function

ASP中过滤所有HTML代码的Function函数!2007-07-16 13:08<%
function htmllen(strHtml)
dim regex
Set regex = New RegExp
regex.Pattern = "<\/?[^>]*>"
regex.Global = True
regex.IgnoreCase = True
htmllen = regex.Replace(strHtml,"")
regex.Pattern = "\n"
regex.Global = True
regex.IgnoreCase = True
htmllen = regex.Replace(htmllen ,"")
Set regex = Nothing
End function
%>

<%
Function LoseHtml(ContentStr)
Dim ClsTempLoseStr,regEx
ClsTempLoseStr = Cstr(ContentStr)
Set regEx = New RegExp
regEx.Pattern = "<\/*[^<>]*>"
regEx.IgnoreCase = True
regEx.Global = True
ClsTempLoseStr = regEx.Replace(ClsTempLoseStr,"")
LoseHtml = ClsTempLoseStr
End function
%>