国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Regex > 正文

怎么用正則表達式寫的HTML分離函數

2024-09-07 17:39:57
字體:
來源:轉載
供稿:網友

存成.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


%>
?


??Enter an HTML String:

??
??


??

?


0 then %>
????

?

?



????View of string with no HTML stripping:

????

<br>????<br>????


????View of string with HTML stripping:

????

?

????????


?

?

????以上就是怎么用正則表達式寫的HTML分離函數的全部內容,更多內容請繼續關注錯新技術頻道網站!

?

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 基隆市| 清水河县| 会昌县| 乐清市| 枞阳县| 璧山县| 正镶白旗| 英山县| 芜湖县| 景德镇市| 南投市| 和林格尔县| 博罗县| 马尔康县| 盈江县| 图片| 西畴县| 防城港市| 全州县| 安化县| 北票市| 潼南县| 新竹市| 临安市| 久治县| 金华市| 长宁县| 海晏县| 河西区| 梨树县| 吉安县| 沙田区| 延寿县| 晋中市| 任丘市| 巧家县| 金寨县| 定南县| 老河口市| 乌拉特后旗| 海原县|