We provide complete mobile and web apps development solutions

Thursday, July 18, 2013

Regular expression for Email validation in java


       public boolean validateEmail(String email) {
              if ((email != null)
                           && email.matches("^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
                                         + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$")) {
                     return true;
              }
              return false;
       }

0 coment�rios:

Post a Comment

Online Training

Your Name :
Your Email: (required)
Your Message: (required)

Powered by Blogger.

Recent Posts

Find Us On Facebook

Popular Posts