Here you can find the source of checkEmailWithSuffix(String email)
public static boolean checkEmailWithSuffix(String email)
//package com.java2s; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean checkEmailWithSuffix(String email) { String regex = "\\w+\\@\\w+\\.(com|cn|com.cn|net|org|gov|gov.cn|edu|edu.cn)"; return startCheck(regex, email); }//from w w w .jav a 2s . c om public static boolean startCheck(String reg, String string) { boolean tem = false; Pattern pattern = Pattern.compile(reg); Matcher matcher = pattern.matcher(string); tem = matcher.matches(); return tem; } }