国产探花免费观看_亚洲丰满少妇自慰呻吟_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分離函數的全部內容,更多內容請繼續關注錯新技術頻道網站!

?

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 肥东县| 顺平县| 石河子市| 霸州市| 应城市| 泽州县| 霍城县| 龙山县| 筠连县| 米泉市| 翁牛特旗| 神农架林区| 顺平县| 方山县| 伊春市| 五莲县| 章丘市| 定南县| 石河子市| 舟曲县| 清镇市| 保靖县| 井冈山市| 天全县| 冀州市| 沂南县| 许昌县| 和林格尔县| 浦县| 会宁县| 泽普县| 江川县| 禄丰县| 囊谦县| 潼关县| 汝南县| 都江堰市| 垣曲县| 临海市| 大城县| 克拉玛依市|