Skip to content

Instantly share code, notes, and snippets.

@JetXing
Created February 2, 2015 09:08
Show Gist options
  • Save JetXing/37d3b10548fd65aeb65d to your computer and use it in GitHub Desktop.
Save JetXing/37d3b10548fd65aeb65d to your computer and use it in GitHub Desktop.
we much have to sure that entered email address is valid of not and there for to check it followed method can be use
public boolean eMailValidations(String emailstring){
Pattern emailPattern = Pattern.compile(".+@.+\\.[a-z]+");
Matcher emailMatcher = emailPattern.matcher(emailstring);
return emailMatcher.matches();
}
//call method
eMailValidations("jet@jet.com");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment