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);
   }
原文地址:https://www.cnblogs.com/ry123/p/4091663.html