asp去除html标记与空格的正则

用asp实现的去除内容的html标记和空格的实现代码
function nohtml(str)
dim re
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.Pattern="(/<.[^/<]*/>)"
str=re.replace(str," ")
re.Pattern="(/<//[^/<]*/>)"
str=re.replace(str," ")
str=replace(str," ","")
str=replace(str," ","")
nohtml=str
set re=nothing
end function
http://www.corange.cn/archives/2008/11/2243.html

posted @ 2009-10-19 16:39  ajuanabc  阅读(151)  评论(0编辑  收藏  举报