概述,初体验
书写规则
应用案例
phone.matches(“1[35789]\d{9}”);
mail.matches(“\w{2,30}@\w{2,20}(\.\w{2,20}){1,2}”);
qq.matches(“[1-9]\d{5,}”)
用于查找数据
用于查找数据、分割内容(邮箱姓名)-分组爬
分割
String content = “张全蛋32林蛋大dasda2张学友4243马有才”;
String[] c = content.split(“\w+”);
for (int i = 0; i < c.length; i++) {
System.out.println(c[i] + " ");
}