标签:java正则表达式 class private pre new compile 表达式 span getc
private Set<String> getCodes(String s) { Set<String> resultSet = new HashSet<>(); Matcher matcher = codePattern.matcher(s); while (matcher.find()) { resultSet.add(matcher.group(1)); } return resultSet; } private static Pattern codePattern = Pattern.compile("\"code\":\"(\\w+)\",");
标签:java正则表达式 class private pre new compile 表达式 span getc
原文地址:https://www.cnblogs.com/zhshlimi/p/9023045.html