<SCRIPT LANGUAGE="vbScript">
dim str
str="How to extract all Chinese characters from an Html page? There cannot be other Html codes."
alert FilterChinese(str)
function FilterChinese(strInput)
dim result:result=""
dimtempStr
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
use regular expression method
<SCRIPT LANGUAGE="vbScript">
dim str
str="How to extract all Chinese characters from an Html page? There cannot be other Html codes."
alert RegExpTest("[u4e00-u9fa5]",str)
Function RegExpTest(patrn, strng)
Dim regEx, Match, Matches 'Create variables.
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = patrn ' Set pattern.
regEx.IgnoreCase = True ' Set whether to be case sensitive.
regEx.Global = True ' Set global replacement.
Set Matches = regEx.Execute(strng) ' Execute search.
For Each Match in Matches ' Traverse the Matches collection.
RetStr = RetStr & Match.Value
Next
RegExpTest = RetStr
End Function
</SCRIPT>