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