static bool regexpMatchGroups(S pat, S s, Matches m) { Matcher matcher = Pattern.compile(pat).matcher(s); if (!matcher.matches()) false; if (m != null) m.m = toStringArray(regexpGetGroups(matcher)); true; }