Matcher m = reg.matcher(str, 0, length(str));
Region region;
int r = 0;
try {
r = m.searchInterruptible(0, length(str), Option.NONE);
region = m.getEagerRegion();
} catch (JOniException je) {
Config.err.println("Pattern: " + repr(pattern) + " Str: " + repr(str));
je.printStackTrace(Config.err);
Config.err.println("ERROR: " + je.getMessage());