'***************************************************************
'Function: IsValidEmail[str]
'Arguments: str, string to be processed
'Author: Mumu
'Date: 2007/7/12
'Description: Check whether the email format is [email protected] or [email protected] and other formats
'Example: <%=IsValidEmail([email protected])%>
'***************************************************************
FunctionIsValidEmail(str)
DimregEx
SetregEx=NewRegExp
regEx.Pattern="[/w/-/.]+@[A-Za-z0-9]+/.(([A-Za-z0-9]{2,4})|([A-Za-z0-9]{2,4}/.[A-Za-z]{2,4}))$"
IsValidEmail=regEx.Test(str)
EndFunction
Articles that may be of interest to you:
Email address Regular expression verification code collection error New webmaster site special edition asp email email address verification regular expression php mail address regular expression implementation and detailed explanation Authentic verification regular expression js code detailed explanation node.js regular expression get all links in web page code examples of code examples in history js date regular expression sharing JS application regular expression conversion case example js regular expression summary several usages of question marks in regular expression summary Js regular expression knowledge summary using regular expression formatting and highlighting json string js regular expression single line pattern and multi-line pattern instance analysis js regular expression test() and exec() usage example js regular expression matching numbers underline and other daily collection JS mailbox verification regular expression