当前位置:首页 > ASP教程 > ASP其他

asp检测是否为中文字符函数

<%
'******************************
'函数:CheckChinese(strng)
'参数:strng,待验证字符
'描述:检测是否为中文字符,返回值:中文为true,否则false
'示例:<%=CheckChinese(strng)%>
'******************************
Function CheckChinese(strng)
CheckChinese = true
Dim regEx, Match
Set regEx = New RegExp
regEx.Pattern = "||#|&|?|@|%|*|/|.|,|;|'|:|-|_|+|^|""|=|<|>| "
regEx.IgnoreCase = True
Set Match = regEx.Execute(strng)
if match.count then CheckChinese= false
End Function
%>
【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!