public static void main(String[] args) { String str = "123我是456张三789的学生"; String regex2 = "\\d{1,}"; Pattern p = Pattern.compile(regex2); Matcher matcher = p.matcher(str); while(matcher.find()){ System.out.println(matcher.group()); } }
标签:reg 正则表达 system stat sys pil 正则 表达式 []
public static void main(String[] args) { String str = "123我是456张三789的学生"; String regex2 = "\\d{1,}"; Pattern p = Pattern.compile(regex2); Matcher matcher = p.matcher(str); while(matcher.find()){ System.out.println(matcher.group()); } }
标签:reg 正则表达 system stat sys pil 正则 表达式 []
原文地址:http://www.cnblogs.com/pecool/p/8040287.html