网站开发与移动开发

博客园 首页 新随笔 管理

用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 on 2009-10-19 16:39  txf2004  阅读(141)  评论(0编辑  收藏  举报