java 正则匹配int型
private static Pattern DIGIT_PATTERN = Pattern.compile("=\\d++"); Matcher goodsTypeMatcher = DIGIT_PATTERN.matcher(scoreFour); if (goodsTypeMatcher.find()) { String comment = goodsTypeMatcher.group(); generalComments+=Integer.valueOf(comment); }