我们存储在数据库中的内容是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 %>
推荐阅读
newasp中main类
<% Const IsDeBug = 1 Class NewaspMain_Cls Public membername, memberpass, membergrade, membergroup, memberid Public memberclass, menbernickname, Cookies_Name, CheckPassword Public SiteNam>>>详细阅读
本文标题:ASP中过滤UBB和Html标签
地址:http://www.17bianji.com/kaifa2/ASP/33067.html
1/2 1