if (rawRegexp.length() < 2) { throw new IllegalStateException(L.l( "Can't find delimiters in regexp '{0}'.", rawRegexp)); }
  private static Pattern compileRegexp(StringValue rawRegexp)  {    Pattern pattern = _patternCache.get(rawRegexp);    if (pattern != null)      return pattern;    char delim = rawRegexp.charAt(0);    if (delim == '{')      delim = '}';    else if (delim == '[')      delim = ']';    else if (delim == '(')      delim = ')';    int tail = rawRegexp.lastIndexOf(delim);    if (tail <= 0)      throw new IllegalStateException(L.l(        "Can't find second {0} in regexp '{1}'.",        String.valueOf((char) delim),        rawRegexp));    int len = rawRegexp.length();    int flags = 0;    boolean isExt = false;    boolean isGreedy = true;    for (int i = tail + 1; i < len; i++) {      char ch = rawRegexp.charAt(i);      switch (ch) {      case 'i':        flags |= Pattern.CASE_INSENSITIVE;        break;      case 's':        flags |= Pattern.DOTALL;        break;      case 'x':        flags |= Pattern.COMMENTS;        break;      case 'm':        flags |= Pattern.MULTILINE;        break;      case 'U':        isGreedy = false;        break;      }    }    StringValue regexp = rawRegexp.substring(1, tail);    String cleanRegexp = cleanRegexp(regexp, (flags & Pattern.COMMENTS) != 0);    if (! isGreedy)      cleanRegexp = toNonGreedy(cleanRegexp);    pattern = Pattern.compile(cleanRegexp, flags);    _patternCache.put(rawRegexp, pattern);    return pattern;  }