ASP从HTML中只取出文字的代码

Category:成都网站建设     Time:2011-07-26 13:54     点击: 次

Function ClearHTML(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=Rep

Function ClearHTML(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
ClearHTML=strHTML
Set objRegExp = Nothing
End Function
'Response.write ClearHTML(rsmm("Content"))
nr=ClearHTML(rsmm("Content"))
Response.write(left(nr,80))


本站ASP从HTML中只取出文字的代码

(责任编辑:商易网络)



商易网络是成都品牌形象塑造专家,致力提供高端品牌成都网站建设,SEO网站优化,网站推广,网站策划以及外贸网站建设与网络营销免费咨询等服务;我们能让企业品牌更有力量,咨询热线:400-888-5594