手机
当前位置:查字典教程网 >编程开发 >正则表达式 >asp 正则表达式检测http开头的函数
asp 正则表达式检测http开头的函数
摘要:'####################################'函数:ishttp[str]'参数:str,待处理的字符串'作者...

'####################################

'函数:ishttp[str]

'参数:str,待处理的字符串

'作者:木木

'日期:2007/7/12

'描述:检测HTTP连接地址或地址栏是否以HTTP开头

'示例:<%=ishttp(http://www.alixixi.com)%>

'####################################

Functionishttp(str)

DimregEx

SetregEx=NewRegExp

regEx.Pattern="^(http|HTTP)[A-Za-z]{0,1}://"

ishttp=regEx.Test(str)

Endfunction

验证邮件地址是否符合标准

<%

'******************************

'函数:isemail(strng)

'参数:strng,待验证的邮件地址

'作者:阿里西西

'日期:2007/7/13

'描述:验证邮件地址是否符合标准

'示例:<%=isemail(ali@alixixi.com)%>

'******************************

Functionisemail(strng)

isemail=false

DimregEx,Match

SetregEx=NewRegExp

regEx.Pattern="^w+((-w+)|(.w+))*@[A-Za-z0-9]+((.|-)[A-Za-z0-9]+)*.[A-Za-z0-9]+$"

regEx.IgnoreCase=True

SetMatch=regEx.Execute(strng)

ifmatch.countthenisemail=true

EndFunction

%>

正则表达式检测中国移动电话手机号码'*********************************************************

'函数:mobilecheck[str]

'参数:str,待处理的字符串

'作者:木木

'日期:2007/7/12

'描述:检测移动电话手机号码

'示例:<%=mobilecheck("13912345678")%>

'*********************************************************

Functionmobilecheck(str)

DimregEx

SetregEx=NewRegExp

regEx.Pattern="^(13[4-9]|15(8|9))d{8}$"

mobilecheck=regEx.Test(str)

EndFunction

【asp 正则表达式检测http开头的函数】相关文章:

asp下正则实现URL自动链接的一个函数

正则表达式 应用四则

用正则表达式来表示中文

正则表达式详述 四

正则表达式详述 三

正则表达式学习笔记

请教一个正则表达式,匹配所有Html标签外部的指定字符串

正则表达式详述第一部

JScript 和 VBScript 正则表达式第1/2页

正则表达式中的特殊字符

精品推荐
分类导航