现在的位置: 首页 > 综合 > 正文

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

2012年12月08日 ⁄ 综合 ⁄ 共 246字 ⁄ 字号 评论关闭

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

抱歉!评论已关闭.