code: public void setIndex(int position) {
          if (position < search_.beginIndex() 
              || position > search_.endIndex()) {
              throw new IndexOutOfBoundsException(
                  "setIndex(int) expected position to be between " +
                  search_.beginIndex() + " and " + search_.endIndex());
          }
          search_.reset_ = false;
          search_.setMatchedLength(0);
          search_.matchedIndex_ = DONE;
      }
docs: <p>
  Sets the position in the target text at which the next search will start.
  This method clears any previous match.
  </p>
  @param position position from which to start the next search
  @exception IndexOutOfBoundsException thrown if argument position is out
  of the target text range.
  @see #getIndex