You should check the Java PRO archives (I believe it was December's issue).
In the regular expressions article, they use an example (I think..) of
utilizing regular expressions to validate an email address.  You should be
able to look at the article online.  They even give the location of a free
regular-expression evaluator as well...

Erik Sahl
[EMAIL PROTECTED]

> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> blueads.com
> Sent: Monday, February 14, 2000 3:10 AM
> To: [EMAIL PROTECTED]
> Subject: email check
>
>
> Does anyone have a good example of checking for valid email that they care
> to share? Better than this one?
>
> // Make sure email it is not null
> if(email == null)
>                 return false;
>                 int length=email.length();
> if((length > 3 && length < 31) && (email.indexOf('@') > -1) &&
> (email.indexOf('.') > -1))
>                         return true;
>                 else
>                         return false;
>
> Tom K.
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to