28,391
社区成员
发帖
与我相关
我的任务
分享
Function RemoveHTML(s) '去掉所有HTML标记
Dim re
Set re = new RegExp
re.IgnoreCase = True
re.Global = True
re.Pattern = "<(.[^>]*)>"
s = re.Replace(s,"")
RemoveHTML = s
set re = Nothing
End Function
dim str
str = "<FONT face=Verdana> <FONT face=宋体 size=2> <FONT size=2>产品名称:三星( <FONT face=宋体 size=2>Samsung </FONT>) <FONT face=宋体 size=2>ML-1610 </FONT>硒鼓 <BR>产品型号: <FONT face=Verdana>ML-1610D2, <FONT face=宋体 size=2>ML-2010D3, <FONT face=宋体 size=2>SCX-4521D3 </FONT> </FONT> </FONT> <BR> </FONT> <SPAN class=font12-blue-bold>硒鼓适用: </SPAN> <FONT size=2>激光打印机,多功能一体机 <BR>打印颜色:黑色 <BR>打印页数:2000页 <BR>产品品牌:西进打印耗材 <BR>适用机型: <FONT face=宋体 size=2>Samsung ML-1610, <FONT face=宋体 size=2>2010,2510,2570,2570N,2571,/ <FONT face=宋体 size=2>SCX-4321,SCX-4521F,/ <FONT face=宋体 size=2>Xerox Phaser 3117,3122,3124,3125,/ <FONT face=宋体 size=2>Xerox WorkCentreTMPE220,/ <FONT face=宋体 size=2>Dell 1100 </FONT> </FONT> </FONT> </FONT> </FONT> </FONT> </FONT> </FONT> </FONT> "
str = RemoveHTML(str)
response.write str
dim str
str = "<FONT face=Verdana> <FONT face=宋体 size=2> <FONT size=2>产品名称:三星( <FONT face=宋体 size=2>Samsung </FONT>) <FONT face=宋体 size=2>ML-1610 </FONT>硒鼓 <BR>产品型号: <FONT face=Verdana>ML-1610D2, <FONT face=宋体 size=2>ML-2010D3, <FONT face=宋体 size=2>SCX-4521D3 </FONT> </FONT> </FONT> <BR> </FONT> <SPAN class=font12-blue-bold>硒鼓适用: </SPAN> <FONT size=2>激光打印机,多功能一体机 <BR>打印颜色:黑色 <BR>打印页数:2000页 <BR>产品品牌:西进打印耗材 <BR>适用机型: <FONT face=宋体 size=2>Samsung ML-1610, <FONT face=宋体 size=2>2010,2510,2570,2570N,2571,/ <FONT face=宋体 size=2>SCX-4321,SCX-4521F,/ <FONT face=宋体 size=2>Xerox Phaser 3117,3122,3124,3125,/ <FONT face=宋体 size=2>Xerox WorkCentreTMPE220,/ <FONT face=宋体 size=2>Dell 1100 </FONT> </FONT> </FONT> </FONT> </FONT> </FONT> </FONT> </FONT> </FONT> "
str = RemoveHTML(str)
response.write str
Function RemoveHTML(s) '去掉所有HTML标记
Dim re
Set re = new RegExp
re.IgnoreCase = True
re.Global = True
re.Pattern = "<(.[^>]*)>"
s = re.Replace(s,"")
RemoveHTML = s
set re = Nothing
End Function