//是否全是英文
boolean English = str.matches("[a-zA-Z]+");
//是否全是数字
Boolean number = str.matches("[0-9]+");
//只有英文和数字
boolean en = str.matches("[a-zA-Z0-9]+");
//是否包含英文
String eng= ".*[a-zA-z].*";
boolean res = str.matches(eng);
//是否包含数字
String reg = ".*[0-9].*";
boolean rest = str.matches(reg);
//判断是否为纯中文,不是返回false
String rege = "[\\u4e00-\\u9fa5]+";
boolean result = str.matches(rege);