您的位置:首页 > 编程语言 > ASP

ASP汉字检测函数

2007-12-06 10:21 183 查看

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: