public void replaceNextX(){
  int totalCount=index + nextX;
  if (totalCount >= searchMatch.size()) {
    totalCount=searchMatch.size();
  }
  for (int i=index; i < totalCount; i++) {
    replace();
  }
}

public void replaceNextX ( ) { int totalCount = index + nextX ; if ( totalCount >= searchMatch . size ( ) ) { totalCount = searchMatch . size ( ) ; } for ( int i = index ; i < totalCount ; i ++ ) { replace ( ) ; } }
replaces the next x steps in the script
