package 第五章字符串;
public class text102ye {
public static void main(String[] args) {
// TODO Auto-ge
String regex="";
//电子邮件
String check =
"^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)"
+ "?\\.)+[a-zA-Z]{2,}$";
String ff="843070287@qq.com";
boolean ff2=ff.matches(check);
System.out.println(ff2);
}
}
public class text102ye {
public static void main(String[] args) {
// TODO Auto-ge
String regex="";
//电子邮件
String check =
"^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)"
+ "?\\.)+[a-zA-Z]{2,}$";
String ff="843070287@qq.com";
boolean ff2=ff.matches(check);
System.out.println(ff2);
}
}