Java Email Validate isStrEmailAddress(String str)

Here you can find the source of isStrEmailAddress(String str)

Description

is Str Email Address

License

Apache License

Declaration

public final static boolean isStrEmailAddress(String str) 

Method Source Code

//package com.java2s;
/*//w  ww .j ava 2s  .  co m
 * Copyright Bruce Liang (ldcsaa@gmail.com)
 *
 * Version   : Log-Cutter 2.0.2
 * Author   : Bruce Liang
 * Website   : http://www.jessma.org
 * Project   : https://github.com/ldcsaa
 * Blog      : http://www.cnblogs.com/ldcsaa
 * WeiBo   : http://weibo.com/u/1402935851
 * QQ Group   : 75375912
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.util.regex.Pattern;

public class Main {
    private static final Pattern PATTERN_EMAIL_ADDR = Pattern.compile(
            "^[a-z0-9_\\-]+(\\.[_a-z0-9\\-]+)*@([_a-z0-9\\-]+\\.)+([a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)$");

    public final static boolean isStrEmailAddress(String str) {
        return PATTERN_EMAIL_ADDR.matcher(str).matches();
    }
}

Related

  1. isEmailValid(String email)
  2. isEmailValid(String emailAddress)
  3. isLegarEmail(String email)
  4. isMail(String email)
  5. isMobilesOrEmail(String str)
  6. isValidEmail(final String email)
  7. isValidEmail(final String email)
  8. isValidEmail(String email)
  9. isValidEmail(String email)