core/src/main/java/org/apache/hop/core/sql/SqlCondition.java
int searchForWord(String clause, String word, int startIndex) throws HopSqlException {
    int index = startIndex;
    while (index < clause.length()) {
      index = ThinUtil.skipChars(clause, index, '\'', '(');
      if (index + word.length() > clause.length()) {
        return -1; // done.
      }
      if (clause.substring(index).toUpperCase().startsWith(word.toUpperCase())) {
        if (index > 0 && String.valueOf(clause.charAt(index - 1)).matches("\\S")) {
          // symbol before is not a whitespace character
          index++;
          continue;
        }
        if (index + word.length() < clause.length()
            && String.valueOf(clause.charAt(index + word.length())).matches("\\S")) {
          // symbol after is not a whitespace character
          index++;
          continue;
        }
        return index;
      }
      index++;
    }
    return -1;
  }
/**
   * Searches for the given word in a clause and returns the start index if found, -1 if not found.
   * This method skips brackets and single quotes. Case is ignored
   *
   * @param clause the clause
   * @param word the word to search
   * @param startIndex the index to start searching
   * @return the index if the word is found, -1 if not found
   * @throws HopSqlException
   */
Searches for the given word in a clause and returns the start index if found, -1 if not found.
This method skips brackets and single quotes. Case is ignored


Searches for the given word in a clause and returns the start index if found - 1 if not found . This method skips brackets and single quotes . Case is ignored
int searchForWord(String clause, String word, int startIndex) throws HopSqlException {
    int index = startIndex;
    while (index < clause.length()) {
      index = ThinUtil.skipChars(clause, index, '\'', '(');
      if (index + word.length() > clause.length()) {
        return -1; 
      }
      if (clause.substring(index).toUpperCase().startsWith(word.toUpperCase())) {
        if (index > 0 && String.valueOf(clause.charAt(index - 1)).matches("\\S")) {
          index++;
          continue;
        }
        if (index + word.length() < clause.length()
            && String.valueOf(clause.charAt(index + word.length())).matches("\\S")) {
          index++;
          continue;
        }
        return index;
      }
      index++;
    }
    return -1;
  }
int searchForWord ( String clause , String word , int startIndex ) throws HopSqlException { int index = startIndex ; while ( index < clause . length ( ) ) { index = ThinUtil . skipChars ( clause , index , '\'' , '(' ) ; if ( index + word . length ( ) > clause . length ( ) ) { return - 1 ; } if ( clause . substring ( index ) . toUpperCase ( ) . startsWith ( word . toUpperCase ( ) ) ) { if ( index > 0 && String . valueOf ( clause . charAt ( index - 1 ) ) . matches ( "\\S" ) ) { index ++ ; continue ; } if ( index + word . length ( ) < clause . length ( ) && String . valueOf ( clause . charAt ( index + word . length ( ) ) ) . matches ( "\\S" ) ) { index ++ ; continue ; } return index ; } index ++ ; } return - 1 ; }
Searches for the given word in a clause and returns the start index if found, -1 if not found.
Searches for the given word in a clause and returns the start index if found - 1 if not found .
// done. // symbol before is not a whitespace character // symbol after is not a whitespace character