static S regexpFirstGroup(S pat, S s) { Matcher m = Pattern.compile(pat).matcher(s); if (m.find()) ret m.group(1); else null; }