static Map compileRegexp_cache = syncMRUCache(10); static java.util.regex.Pattern compileRegexp(S pat) { java.util.regex.Pattern p = compileRegexp_cache.get(pat); if (p == null) { ifdef compileRegexp_debug print("Compiling regexp: " + pat); endifdef compileRegexp_cache.put(pat, p = java.util.regex.Pattern.compile(pat)); } ret p; }