过滤ASP中UBB和Html标签的方法

我们一般情况下在存储在数据库中的内容是HTML格式的,但是我们有时候会需要无格式显示这内容,那么你知道怎么过滤ASP中UBB和Html标签吗?下面我们就去看看过滤ASP中UBB和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,” “) 

nohtml=str 

set re=nothing 

end function 

%>

上文就是小编为大家介绍过滤ASP中UBB和Html标签的方法,想知道更多精彩内容的朋友们就赶紧收藏爱站技术频道吧。