asp去掉html,保留img br p div的正則實現(xiàn)代碼
更新時間:2009年02月21日 03:36:58 作者:
非常實用的一個函數(shù),這里主要用到了正則的匹配模式大家可以看腳本之家網(wǎng)站的正則專題
復制代碼 代碼如下:
'去掉html中的table代碼
Function OutTable(str)
dim a,re
set re=new RegExp
re.pattern="<(?!img|br|p|div).*?>"
re.global=true
a=str
OutTable=re.replace(a,"")
End Function