Kodo
06-19-2003, 01:30 PM
This regular expression will allow you to validate email address with alphanumeric chars before the @ symbol. It will check for the @ symbol and then for alphanumeric chars with the exception of ( - ) followed by the ( . ) and a 2 or 3 alphanumeric char domain suffix.
--------------------------------------
myemail="blda@hb-lah.com"
set objRegExp= New RegExp
objRegExp.Global = false
objRegExp.IgnoreCase=false
objRegExp.pattern= "([\w]+@[a-zA-Z0-9-]+\.[a-z]{2,3}$)"
if objRegExp.test (myemail)=true then
response.write "Yes"
else
response.write "no"
end if
set objRegExp=nothing
by Jim Losi
www.acrodata.com
--------------------------------------
myemail="blda@hb-lah.com"
set objRegExp= New RegExp
objRegExp.Global = false
objRegExp.IgnoreCase=false
objRegExp.pattern= "([\w]+@[a-zA-Z0-9-]+\.[a-z]{2,3}$)"
if objRegExp.test (myemail)=true then
response.write "Yes"
else
response.write "no"
end if
set objRegExp=nothing
by Jim Losi
www.acrodata.com