asp檢測(cè)是否為中文字符函數(shù)
更新時(shí)間:2009年02月21日 03:46:55 作者:
檢測(cè)是否為中文字符
<%
'******************************
'函數(shù):CheckChinese(strng)
'參數(shù):strng,待驗(yàn)證字符
'描述:檢測(cè)是否為中文字符,返回值:中文為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
%>
'******************************
'函數(shù):CheckChinese(strng)
'參數(shù):strng,待驗(yàn)證字符
'描述:檢測(cè)是否為中文字符,返回值:中文為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
%>
相關(guān)文章
asp實(shí)現(xiàn)本周的一周時(shí)間列表的代碼
原理也相對(duì)簡(jiǎn)單,就是利用date函數(shù)獲取日期,然后通過(guò)固定的字符串?dāng)?shù)組進(jìn)行替換。2009-02-02巧用FileSystem組件實(shí)現(xiàn)WEB應(yīng)用中的本地特定打印的方法
巧用FileSystem組件實(shí)現(xiàn)WEB應(yīng)用中的本地特定打印的方法...2007-04-04用asp實(shí)現(xiàn)網(wǎng)頁(yè)郵箱訪問(wèn)的方法
用asp實(shí)現(xiàn)網(wǎng)頁(yè)郵箱訪問(wèn)的方法...2007-04-04A利用ASP小偷和Google實(shí)現(xiàn)在線翻譯功能的代碼
A利用ASP小偷和Google實(shí)現(xiàn)在線翻譯功能的代碼...2007-11-11