package cn.zxj.com;
public class Demo {
public static void main(String[] args) {
String email1 = "124.com.cn";
String email2 = "12@123.com.cn";
String regex = "\\w+@\\w+(\\.\\w+)+";
System.out.println(email1.matches(regex));
System.out.println(email2.matches(regex));
}
}