Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean esEmail(String correo)
- {
- Pattern pat = null;
- Matcher mat = null;
- pat = Pattern.compile("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$");
- mat = pat.matcher(correo.trim());
- if (mat.find()) {
- return true;
- }else{
- return false;
- }
- }
- pat = Pattern.compile("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@+(\sitio.com)$");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement