当前位置: 首页 > 图文教程 > 网络编程 > 正则表达式 > asp 正则表达式检测http开头的函数

正则表达式
js:正则处理超文本流
正则表达式高级学习技巧
用正则表达式来表示中文
正则表达式,相关链接
js:日期正则表达式及检测
正则表达式检查来访IP是否合法的实际应用
正则表达式简单的检查输入email是否合法程序
VBscript 的正则表达式 字符串匹配
比较不错的C#中的常用的正则表达式
EditPlus 正则替换图片ubb替换成img
向大家推荐一个收集整理正则表达式的网站
正则表达式详述第一部
正则表达式详述 二
正则表达式详述 三
正则表达式详述 四
正则(JS)re=new RegExp("^\\d*$");与re=/^\d*$/;之间区别?
用正则按最后一个"_"分割"字符
[PHP]常用正则表达式收集
一个非常不错的一个正则练习JS版
js正则匹配table tr

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-13   浏览: 42 ::
收藏到网摘: n/a

'####################################
'函数: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([email protected])%>
'******************************
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