我想要实现的实际上很简单:我的行看起来类似于:
V123,V20
10,9999
100,V220
ETC...
基本上是多对带有前导字母/零的数字。我希望能够使用 RegEx 解析它们,到目前为止我在 Java 中发现的是:
Pattern p = Pattern.compile(".*([1-9](?:\\d{0,2})).*",Pattern.MULTILINE);
Matcher m = p.matcher("V999,V50");
System.out.println(m.matches()); - return true
System.out.println(m.groupCount()); --> this one returns 0
任何帮助将不胜感激,谢谢。