code: public int getEnd(int index) {
  		if (this.endpos == null)
  			throw new IllegalStateException("A result is not set.");
  		if (index < 0 || this.nofgroups <= index)
  			throw new IllegalArgumentException(
  					"The parameter must be less than " + this.nofgroups + ": "
  							+ index);
  		return this.endpos[index];
  	}
docs: Return an end position in the target text matched to specified regular
  expression group.
  
  @param index
  Less than <code>getNumberOfGroups()</code>.