public interface MatchResult
| Modifier and Type | Method and Description |
|---|---|
int |
end()
Returns the offset of the last character matched.
|
int |
end(int group)
Returns the offset after the last character of the subsequence captured by
the given group during this match.
|
String |
group()
Returns the input subsequence matched by the previous match.
|
String |
group(int group)
Returns the input subsequence captured by the given group during the previous
match operation.
|
int |
groupCount()
Returns the number of capturing groups in the matched results pattern.
|
int |
start()
Returns the start index of the match.
|
int |
start(int group)
Returns the start index of the subsequence captured by the given group during
this match.
|
int end() throws IllegalStateException
IllegalStateException - If no match has yet been attempted, or if the previous match operation failedint end(int group) throws IndexOutOfBoundsException, IllegalStateException
group - The index of a capturing group in this matcher's patternIndexOutOfBoundsException - If there is no capturing group in the pattern with the given indexIllegalStateException - If no match has yet been attempted, or if the previous match operation failedString group()
String group(int group)
group - The index of a capturing group in this matcher's patternint groupCount()
int start() throws IllegalStateException
IllegalStateException - If no match has yet been attempted, or if the previous match operation failedint start(int group) throws IndexOutOfBoundsException, IllegalStateException
group - The index of a capturing group in this matcher's patternIndexOutOfBoundsException - If there is no capturing group in the pattern with the given indexIllegalStateException - If no match has yet been attempted, or if the previous match operation failed