唐山网站建设

设为主页 加入收藏 繁體中文

动态网页爱好者来看:Asp过滤HTML的函数

核心提示:动态网页爱好者来看:Asp过滤HTML的函数

Asp过滤Html代码

以下为援用的内容:

Function RemoveHTML(strHTML)
Dim objRegExp, Match, Matches
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
'取闭合的<>
objRegExp.Pattern = "<.+?>"
'进行匹配
Set Matches = objRegExp.Execute(strHTML)
' 遍历匹配集合,并替换掉匹配的项目
For Each Match in Matches
strHtml=Replace(strHTML,Match.Value,"")
Next
RemoveHTML=strHTML
Set objRegExp = Nothing
End Function

过滤图片正则表达式

以下为援用的内容:

http://www.fw8.net/


TAG:内容,代码,函数,遍历,爱好者
评论加载中...
内容:
评论者: 验证码: