I have a regular expression:
l:([0-9]+)
This should match this string and return three captures (according to Rubular)
\"l:
Matcher.find() returns false when there are no more matches, so you can do a while loop whilst getting and processing each group. For example, if you want to print all matches, you can use the following:
Matcher m;
Pattern p = Pattern.compile("l:([0-9]+)");
m = p.matcher("l:32, l:98, l:1234");
while (m.find()) {
System.out.println(m.group());
}