asp 正則表達(dá)式檢測(cè)http開(kāi)頭的函數(shù)
更新時(shí)間:2007年08月08日 12:05:38 作者:
'####################################
'函數(shù):ishttp[str]
'參數(shù):str,待處理的字符串
'作者:木木
'日期:2007/7/12
'描述:檢測(cè)HTTP連接地址或地址欄是否以HTTP開(kāi)頭
'示例:<%=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
驗(yàn)證郵件地址是否符合標(biāo)準(zhǔn)
<%
'******************************
'函數(shù):isemail(strng)
'參數(shù):strng,待驗(yàn)證的郵件地址
'作者:阿里西西
'日期:2007/7/13
'描述:驗(yàn)證郵件地址是否符合標(biāo)準(zhǔn)
'示例:<%=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
%>
正則表達(dá)式檢測(cè)中國(guó)移動(dòng)電話手機(jī)號(hào)碼'*********************************************************
'函數(shù):mobilecheck[str]
'參數(shù):str,待處理的字符串
'作者:木木
'日期:2007/7/12
'描述:檢測(cè)移動(dòng)電話手機(jī)號(hào)碼
'示例:<%=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
'函數(shù):ishttp[str]
'參數(shù):str,待處理的字符串
'作者:木木
'日期:2007/7/12
'描述:檢測(cè)HTTP連接地址或地址欄是否以HTTP開(kāi)頭
'示例:<%=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
驗(yàn)證郵件地址是否符合標(biāo)準(zhǔn)
<%
'******************************
'函數(shù):isemail(strng)
'參數(shù):strng,待驗(yàn)證的郵件地址
'作者:阿里西西
'日期:2007/7/13
'描述:驗(yàn)證郵件地址是否符合標(biāo)準(zhǔn)
'示例:<%=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
%>
正則表達(dá)式檢測(cè)中國(guó)移動(dòng)電話手機(jī)號(hào)碼'*********************************************************
'函數(shù):mobilecheck[str]
'參數(shù):str,待處理的字符串
'作者:木木
'日期:2007/7/12
'描述:檢測(cè)移動(dòng)電話手機(jī)號(hào)碼
'示例:<%=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
相關(guān)文章
Java 使用正則表達(dá)式對(duì)象實(shí)現(xiàn)正則的獲取功能
這篇文章主要介紹了Java 使用正則表達(dá)式對(duì)象實(shí)現(xiàn)正則的獲取功能 ,需要的朋友可以參考下2018-04-04notepad++中使用正則表達(dá)式處理數(shù)據(jù)的步驟
這篇文章主要介紹了notepad++中使用正則表達(dá)式處理數(shù)據(jù),詳細(xì)介紹了使用正則表達(dá)式提取文本中特定行的方法,需要的朋友可以參考下2023-05-05javascript中匹配價(jià)格的正則表達(dá)式
價(jià)格的格式應(yīng)該如下,開(kāi)頭數(shù)字若干位,可能有一個(gè)小數(shù)點(diǎn),小數(shù)點(diǎn)后面可以有兩位數(shù)字。hansir給出的對(duì)應(yīng)正則如下2012-09-09學(xué)會(huì)Python正則表達(dá)式,就看這20個(gè)例子(腳本之家修正版)
這篇文章主要介紹了學(xué)會(huì)Python正則表達(dá)式,就看這20個(gè)例子,需要的朋友可以參考下2020-03-03