Java Email Validate isEmail(CharSequence input)

Here you can find the source of isEmail(CharSequence input)

Description

is Email

License

Apache License

Declaration

public static synchronized final boolean isEmail(CharSequence input) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.regex.Pattern;

public class Main {
    private static Pattern email_Pattern = Pattern.compile(
            "^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$");

    public static synchronized final boolean isEmail(CharSequence input) {
        return email_Pattern.matcher(input).matches();
    }//from   w  ww . ja v  a2 s. co  m
}

Related

  1. getEmails(String str)
  2. getFirstEmailAddr(String s)
  3. getSafeMailAddr(String mailAddr)
  4. getSmtpPort(String email)
  5. isEmail(CharSequence email)
  6. isEmail(final String email)
  7. isEmail(final String s)
  8. isEmail(final String text)
  9. isEmail(String correo)