Returns the index within the input string where the match in its entirety
ends. The return value is the next position after the end of the string;
therefore, a match created by the following call:
REMatch myMatch = myExpression.getMatch(myString);
can be viewed (given that myMatch is not null) by creating
String theMatch = myString.substring(myMatch.getStartIndex(),
myMatch.getEndIndex());
But you can save yourself that work, since the toString()
method (above) does exactly that for you.
|