static RuntimeException wrapPatternSyntaxException(PatternSyntaxException e) { if (e == null) null; S pat = e.getPattern(); int i = e.getIndex(); ret new RuntimeException("Regular expression error between " + multiLineQuoteWithSpaces(substring(pat, 0, i)) + " and " + multiLineQuoteWithSpaces(substring(pat, i)) + " - " + e.getMessage()); }