相關(guān)資訊
- 《戰(zhàn)國(guó)無(wú)雙4-2》怎么換服裝?戰(zhàn)國(guó)無(wú)
- 關(guān)于責(zé)任的名言警句大全
- 《戰(zhàn)國(guó)無(wú)雙4-2》PC版如何聯(lián)機(jī)? 戰(zhàn)
- 戰(zhàn)國(guó)無(wú)雙4-2技能覺(jué)醒牛逼嗎 全新
- 《戰(zhàn)國(guó)無(wú)雙4-2》手柄無(wú)效怎么解決
- 戰(zhàn)國(guó)無(wú)雙4-2如何設(shè)置語(yǔ)言 戰(zhàn)國(guó)無(wú)雙
- 戰(zhàn)國(guó)無(wú)雙4-2怎么樣跳過(guò)進(jìn)入開(kāi)場(chǎng)動(dòng)畫(huà)
- 什么是應(yīng)屆生畢業(yè)生
- 應(yīng)屆生簡(jiǎn)歷自我評(píng)價(jià)
- 應(yīng)屆生簡(jiǎn)歷怎么寫
本類常用軟件
-
福建農(nóng)村信用社手機(jī)銀行客戶端下載下載量:584204
-
Windows優(yōu)化大師下載量:416896
-
90美女秀(視頻聊天軟件)下載量:366961
-
廣西農(nóng)村信用社手機(jī)銀行客戶端下載下載量:365699
-
快播手機(jī)版下載量:325855
本文分享給大家學(xué)習(xí)的是如何從Html頁(yè)面中提取所有漢字,希望通過(guò)下面的學(xué)習(xí)對(duì)大家有所幫助。
<SCRIPT LANGUAGE="vbScript">
dim str
str="怎樣從一個(gè)Html頁(yè)面中提取所有漢字呢?不能有其它Html代碼。"
alert FilterChinese(str)
function FilterChinese(strInput)
dim result:result=""
dim tempStr
for i=1 to len(strInput)
tempStr=mid(strInput,i,1)
if left(escape(tempStr),2)="%u" then
result=result & tempStr
end if
next
FilterChinese=result
end function
</SCRIPT>
if asc(tempStr)>255 then
用正則表達(dá)式的方法
<SCRIPT LANGUAGE="vbScript">
dim str
str="怎樣從一個(gè)Html頁(yè)面中提取所有漢字呢?不能有其它Html代碼。"
alert RegExpTest("[\u4e00-\u9fa5]",str)
Function RegExpTest(patrn, strng)
Dim regEx, Match, Matches ' 建立變量。
Set regEx = New RegExp ' 建立正則表達(dá)式。
regEx.Pattern = patrn ' 設(shè)置模式。
regEx.IgnoreCase = True ' 設(shè)置是否區(qū)分大小寫。
regEx.Global = True ' 設(shè)置全局替換。
Set Matches = regEx.Execute(strng) ' 執(zhí)行搜索。
For Each Match in Matches ' 遍歷 Matches 集合。
RetStr = RetStr & Match.Value
Next
RegExpTest = RetStr
End Function
</SCRIPT>