1,检验邮件格式是否正确
public final static String REG_email = "^[\w\d]+@[\w\d]+(\.[\w\d]+)+$"; Pattern pattern = Pattern.compile(RegExpression.REG_email); Matcher m = pattern.matcher(email); if (!m.find()) { System.out.println("Wrong email format."); }