asp正则如何检测http开头函数
'####################################
'函数:ishttp[str]
'参数:str,待处理的字符串
'描述:检测HTTP连接地址或地址栏是否以HTTP开头
'示例:
'####################################
Function ishttp(str)
Dim regEx
Set regEx = New RegExp
regEx.Pattern = "^(http|HTTP)[A-Za-z]{0,1}\:\/\/"
ishttp = regEx.Test(str)
End function
验证邮件地址是否符合标准
'******************************
'函数:isemail(strng)
'参数:strng,待验证的邮件地址
'描述:验证邮件地址是否符合标准
'示例:
'******************************
Function isemail(strng)
isemail = false
Dim regEx, Match
Set regEx = New RegExp
regEx.Pattern = "^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$"
regEx.IgnoreCase = True
Set Match = regEx.Execute(strng)
if match.count then isemail= true
End Function
%>
正则表达式检测中国移动电话手机号码'*********************************************************
'函数:mobilecheck[str]
'参数:str,待处理的字符串
'描述:检测移动电话手机号码
'示例:
'*********************************************************
Function mobilecheck(str)
Dim regEx
Set regEx = New RegExp
regEx.Pattern = "^(13[4-9]|15(8|9))\d{8}$"
mobilecheck= regEx.Test(str)
End Function
asp正则如何检测http开头函数内容不知道朋友们看完后都有什么想法,想要获取更多不同类型的技术文章,关注爱站技术频道网站就可以了。
上一篇:asp正则表达式函数的运用
下一篇:如何在js下进行正则百分比的匹配