'####################################
'Function: ishttp [str]
'Parameter: str, string to be processed
'Author: Mu
'Date: 2007/7/12
'Description: checks whether the HTTP connection address or address bar starts with HTTP.
'Example: <% = 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
Verify that the email address meets the standard
<%
'******************************
'Function: isemail (strng)
'Parameter: strng, the email address to be verified
'Prepared by: alixixi
'Date: 2007/7/13
'Description: Check whether the email address meets the standard.
'Example: <% = 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
%>
Regular Expression detection of China Mobile Phone Numbers '******************************** *************************
'Function: mobilecheck [str]
'Parameter: str, string to be processed
'Author: Mu
'Date: 2007/7/12
Description: Mobile Phone Number detection.
'Example: <% = 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