最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
用正则表达式写的HTML分离函数
时间:2022-06-30 10:51:47 编辑:袖梨 来源:一聚教程网
存成.asp文件,执行,你用ASPHTTP抓内容的时候用这个很爽,当然自己要改进一下了
Option Explicit
Function stripHTML(strHTML)
'Strips the HTML tags from strHTML
Dim objRegExp, strOutput
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<.>"
'Replace all HTML tag matches with the empty string
strOutput = objRegExp.Replace(strHTML, "")
'Replace all with
strOutput = Replace(strOutput, "strOutput = Replace(strOutput, ">", ">")
stripHTML = strOutput 'Return the value of strOutput
Set objRegExp = Nothing
End Function
%>
0 then %>
Option Explicit
Function stripHTML(strHTML)
'Strips the HTML tags from strHTML
Dim objRegExp, strOutput
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<.>"
'Replace all HTML tag matches with the empty string
strOutput = objRegExp.Replace(strHTML, "")
'Replace all with
strOutput = Replace(strOutput, "strOutput = Replace(strOutput, ">", ">")
stripHTML = strOutput 'Return the value of strOutput
Set objRegExp = Nothing
End Function
%>
0 then %>
View of string with no HTML stripping:
View of string with HTML stripping:
相关文章
- 三国志8重制版游玩配置需求介绍说明 10-30
- 三国志8重制版强力武将武力排名一览 10-30
- 三国志8重制版全部成就解锁攻略分享 10-30
- 暗喻幻想加莉卡商量次数刷取方法 10-30
- 暗喻幻想双动的饰品获取方法分享 10-30
- 二重螺旋角色怎么获得-角色获取全途径解析 10-30