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;
}

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 ; }
does the provided sql script contain the specified delimiter ?
