code: static Point findPrevious(
          String text, String query, int startIndex, boolean ignoreCase)
      {
          int offset = StringUtils.lastIndexOf(
              text, query, startIndex, ignoreCase);
          int length = query.length();
          while (offset != -1)
          {
              return new Point(offset, offset + length);
          }
          return null;
      }
docs: Find the previous appearance of the given query in the given text,
  starting at the given index. The result will be a point
  <code>(startIndex, endIndex)</code> indicating the appearance,
  or <code>null</code> if none is found.
  
  @param text The text
  @param query The query
  @param startIndex The start index
  @param ignoreCase Whether the case should be ignored
  @return The previous appearance