国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

asp 實現檢測字符串是否為純字母和數字組合的函數

2020-07-27 13:07:19
字體:
來源:轉載
供稿:網友
<%
'******************************
'函數:CheckString(strng)
'參數:strng,待驗證字符串
'作者:阿里西西
'日期:2007/7/13
'描述:檢測字符串是否為純字母和數字組合
'示例:<%=CheckString(strng)%>
'******************************
Function CheckString(strng)
    CheckString = true
    Dim regEx, Match
    Set regEx = New RegExp
    regEx.Pattern = "^[A-Za-z0-9]+$"
    regEx.IgnoreCase = True
    Set Match = regEx.Execute(strng)
    if match.count then CheckString= false
End Function
%>
檢測是否為中文字符
<%
'******************************
'函數:CheckChinese(strng)
'參數:strng,待驗證字符
'作者:阿里西西
'日期:2007/7/13
'描述:檢測是否為中文字符,返回值:中文為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
%>
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 秦安县| 阳城县| 新绛县| 祁东县| 寿阳县| 金寨县| 都匀市| 英超| 阿巴嘎旗| 青岛市| 中牟县| 平安县| 神木县| 芒康县| 隆昌县| 昌乐县| 巴林左旗| 青铜峡市| 碌曲县| 封丘县| 康平县| 大埔县| 炎陵县| 右玉县| 民县| 孟村| 全南县| 弥勒县| 车险| 鱼台县| 南投县| 永清县| 宁波市| 昆山市| 合肥市| 乐清市| 合作市| 莒南县| 天气| 阿荣旗| 丹棱县|