ASP
Here you can find some FREE usefull Classic ASP / VBScript code snippets, class modules, etc.
Function IsValidEmail(String)Boolean
The must-have email address format validation function. Returns True or False.
Example
<% if IsValidEmail(request.form("email")) then response.write "Email address OK!" else response.write "Invalid email address!" end if %> Source Code <%
function IsValidEmail(e) dim re set re = new RegExp re.pattern="^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$" IsValidEmail=re.Test(e) set re=nothing end function %> |