易截截图软件、单文件、免安装、纯绿色、仅160KB

asp常用的正则表达式实现字符串的替换


asp常用的正则表达式实现字符串的替换,主要包括去除html标签,去除class标签和去除script标签等
去除html标签正则<\/*[^<>]*>
Function LoseHtml(ContentStr)
Dim ClsTempLoseStr,RegEx
ClsTempLoseStr = Cstr(ContentStr)
Set RegEx = New RegExp
RegEx.Pattern = "<\/*[^<>]*>"
RegEx.IgnoreCase = True
RegEx.Global = True
ClsTempLoseStr = RegEx.Replace(ClsTempLoseStr,"")
Set RegEx = Nothing
LoseHtml = ClsTempLoseStr
End function
去除网页中的class
Function LoseClassTag(ContentStr)
Dim ClsTempLoseStr,RegEx
ClsTempLoseStr = Cstr(ContentStr)
Set RegEx = New RegExp
RegEx.Pattern = "(class=){1,}(""|\'){0,1}\S+(""|\'|>|\s){0,1}"
RegEx.IgnoreCase = True
RegEx.Global = True
ClsTempLoseStr = RegEx.Replace(ClsTempLoseStr,"")
LoseClassTag = ClsTempLoseStr
Set RegEx = Nothing
End Function
Function LoseScriptTag(ContentStr)
Dim ClsTempLoseStr,RegEx
ClsTempLoseStr = Cstr(ContentStr)
Set RegEx = New RegExp
RegEx.Pattern = "(<script){1,}[^<>]*>[^\0]*(<\/script>){1,}"
RegEx.IgnoreCase = True
RegEx.Global = True
ClsTempLoseStr = RegEx.Replace(ClsTempLoseStr,"")
LoseScriptTag = ClsTempLoseStr
Set RegEx = Nothing
End Function
Function LoseIFrameTag(ContentStr)
Dim ClsTempLoseStr,RegEx
ClsTempLoseStr = Cstr(ContentStr)
Set RegEx = New RegExp
RegEx.Pattern = "(<iframe){1,}[^<>]*>[^\0]*(<\/iframe>){1,}"
RegEx.IgnoreCase = True
RegEx.Global = True
ClsTempLoseStr = RegEx.Replace(ClsTempLoseStr,"")
LoseIFrameTag = ClsTempLoseStr
Set RegEx = Nothing
End Function
Function LoseObjectTag(ContentStr)
Dim ClsTempLoseStr,RegEx
ClsTempLoseStr = Cstr(ContentStr)
Set RegEx = New RegExp
RegEx.Pattern = "(<object){1,}[^<>]*>[^\0]*(<\/object>){1,}"
RegEx.IgnoreCase = True
RegEx.Global = True
ClsTempLoseStr = RegEx.Replace(ClsTempLoseStr,"")
LoseObjectTag = ClsTempLoseStr
Set RegEx = Nothing
End Function
Function LoseSpanTag(Conte


相关文档:

Flash与ASP进行连接数据库操作

1、flash发送数据到asp
loadVariables ("url" ,"target" [, variables])
2、asp得到数据,并处理后,将数据发送到flash
如:Response.Write("login=true&des=success")
3、flash处理从asp收到的数据
如:_root.gotoAndPlay(eval("login")) ......

[ASP中使用三层架构] 9.用户登录之一 User表与相关类

    接下来开始讲解如何用三层架构来建立用户登录过程.
    这个过程用一般的编程方式写起来很简单,从这里入手来讲解三层架构的实例,想必大家都会更容易了解其中的逻辑结构.
   
    首先我们做一些准备工作,构造这个业务需要用到的几个类,其中包括三个部 ......

asp vb com组件开发与调试

今天在公司服务器上看一个老掉牙的asp程序,发现竟然调用了自定义com组件,是vb写的,封装了数据库连接与操作,文档上写这样做是为什么用户到服务器也看不到数据库的用户名与密码,也对啊,这个是财务的服务器,当然不能让我们it随便看了,呵呵!(it忽悠finance,让finance相信it看不到数据库用户名与密码,my god)由于, ......

使用ASP验证email邮箱地址

<%
'true=是邮件;false=不是;
Function validate(ByVal str)
Dim temp,reg
Set reg = new regexp
reg.ignorecase=true
reg.global=true
reg.pattern = "^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"
validate = reg.test(Trim(str))
Set reg = Nothing
End Function
'************************ ......

ASP:Crazy蛙!模版操作类(最简单的模板类、仅提供交流)

文件名:Awa_temp.Class.asp
 <%
'Crazy蛙!模板操作类
'作者Crazy~蛙! QQ:379969387 欢迎交流
'版本V1.0;
Class AwaTemp
Public aa
Private FSO,StrTemp,FileData,GetDatas,StrHtmlName,htmlwrite,StrLabel,StrLValues
'===========================================
'构造函数_初始化FSO组件
'========= ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号