code: public static boolean containsSqlScriptDelimiters(String script, String delim) {
          boolean inLiteral = false;
          char[] content = script.toCharArray();
          for (int i = 0; i < script.length(); i++) {
              if (content[i] == '\'') {
                  inLiteral = !inLiteral;
              }
              if (!inLiteral && script.startsWith(delim, i)) {
                  return true;
              }
          }
          return false;
      }
docs: Does the provided SQL script contain the specified delimiter?
  
  @param script the SQL script
  @param delim  String delimiting each statement - typically a ';' character