您现在的位置是:网站首页> 编程资料编程资料

asp检测是否为中文字符函数_应用技巧_

2023-05-25 386人已围观

简介 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
%>

-六神源码网