I have a regular expression:
l:([0-9]+)
This should match this string and return three captures (according to Rubular)
"l:32, l:98, l:234"
Here is my code:
Pattern p ...
Matcher m = p.matcher(...);
m.find();
System.out.println(m.groupCount());
This prints out 1 (group) when there are three, so I can only do m.group(1) which will only return 32.