sS regexpFirstGroup(S pat, S s) { Matcher m = regexpMatcher(pat, s); if (m.find()) ret m.group(1); else null; } sS regexpFirstGroup(java.util.regex.Pattern pat, S s) { Matcher m = regexpMatcher(pat, s); if (m.find()) ret m.group(1); else null; } sS regexpFirstGroup(S pat, Iterable strings) { var compiled = compileRegexp(pat); fOr (S s : strings) try object S group = regexpFirstGroup(compiled, s); null; }