On Saturday, December 15, 2012 9:36:36 PM UTC+1, bhomass wrote:
in that case, what is the point of matchResult.getGroupCount()? it is always 1.
Groups in regexps are those things between parentheses. In "a(b+)c" matching against "abbc", there would be 2 groups, the first one (group 0) would be "abbc" while the second one (group 1) would be "bb".