主页 > 知识库 > asp 正则表达式检测http开头的函数

asp 正则表达式检测http开头的函数

热门标签:Mysql连接数设置 阿里云 服务器配置 科大讯飞语音识别系统 团购网站 银行业务 Linux服务器 电子围栏
'####################################
'函数:ishttp[str]
'参数:str,待处理的字符串
'作者:木木
'日期:2007/7/12
'描述:检测HTTP连接地址或地址栏是否以HTTP开头
'示例:%=ishttp(http://www.alixixi.com)%>
'####################################

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,待验证的邮件地址
'作者:阿里西西
'日期:2007/7/13
'描述:验证邮件地址是否符合标准
'示例:%=isemail(ali@alixixi.com)%>
'******************************
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,待处理的字符串
'作者:木木
'日期:2007/7/12
'描述:检测移动电话手机号码
'示例:%=mobilecheck("13912345678")%>
'*********************************************************


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开头的函数》,本文关键词  ;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 收缩
    • 微信客服
    • 微信二维码
    • 电话咨询

    • 400-1100-266