最新下载
热门教程
- 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:
相关文章
- 手机看电影下载什么软件最好-手机看电影软件推荐 03-22
- 现在比较火的游戏排行榜有哪些 高人气的手游排行分享2026 03-22
- 最热门的回合制游戏有哪些 2026高人气的回合制手游下载分享 03-22
- 火车票余票实时查询入口-火车票时刻表精准查询入口 03-22
- 2026年游戏充值排行榜有哪些 高人气的氪金手游下载分享 03-22
- 好玩的日本恋爱游戏有哪些 2026热门日本恋爱手游推荐 03-22