private Pattern generatePattern() {
    StringBuilder sb = new StringBuilder();
    sb.append('(');
    for (String delim : ALL_DELIMS) { // For each delimiter
      if (sb.length() != 1) sb.append('|');
      sb.append('\\');
      sb.append(delim);
    }
    sb.append(')');

    return Pattern.compile(sb.toString());
  }
Generate the regex pattern to tokenize the query expression.

@return the regex pattern
ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java