asp去除html標(biāo)記與空格的正則
更新時間:2008年04月26日 21:51:53 作者:
用asp實現(xiàn)的去除內(nèi)容的html標(biāo)記和空格的實現(xiàn)代碼
function nohtml(str)
dim re
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.Pattern="(\<.[^\<]*\>)"
str=re.replace(str," ")
re.Pattern="(\<\/[^\<]*\>)"
str=re.replace(str," ")
str=replace(str," ","")
str=replace(str," ","")
nohtml=str
set re=nothing
end function
dim re
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.Pattern="(\<.[^\<]*\>)"
str=re.replace(str," ")
re.Pattern="(\<\/[^\<]*\>)"
str=re.replace(str," ")
str=replace(str," ","")
str=replace(str," ","")
nohtml=str
set re=nothing
end function
相關(guān)文章
php匹配網(wǎng)址的正則 幾乎可以匹配任何網(wǎng)址
php匹配網(wǎng)址的正則 幾乎可以匹配任何網(wǎng)址,需要的朋友可以參考下2013-05-05asp提取內(nèi)容中的手機號碼,qq,網(wǎng)址的正則代碼
有時候需要獲取頁面源代碼中的手機號碼,qq,網(wǎng)址,一般情況下都是用正則表達式實現(xiàn)的,需要的朋友可以參考下。2011-09-09