ASP汉字检测函数
Function RegChinese(str)
Dim regEx, retVal
Set regEx = New RegExp
regEx.Pattern = "^[^\u0000-\u00FF]*$"
regEx.IgnoreCase = False
retVal = regEx.Test(str)
If retVal Then
RegChinese = True '是汉字
Else
RegChinese = False '不是汉字
End If
End Function
Dim regEx, retVal
Set regEx = New RegExp
regEx.Pattern = "^[^\u0000-\u00FF]*$"
regEx.IgnoreCase = False
retVal = regEx.Test(str)
If retVal Then
RegChinese = True '是汉字
Else
RegChinese = False '不是汉字
End If
End Function