MatchResult (Java SE 26 & JDK 26)
- All Known Implementing Classes:
Matcher
-
Method Summary
intend()Returns the offset after the last character matched.
intend(int group) Returns the offset after the last character of the subsequence captured by the given group during this match.
default intReturns the offset after the last character of the subsequence captured by the given named-capturing group during the previous match operation.
group()Returns the input subsequence matched by the previous match.
group(int group) Returns the input subsequence captured by the given group during the previous match operation.
Returns the input subsequence captured by the given named-capturing group during the previous match operation.
intReturns the number of capturing groups in this match result's pattern.
default booleanhasMatch()Returns whether
thiscontains a valid match from a previous match or find operation.Returns an unmodifiable map from capturing group names to group numbers.
intstart()Returns the start index of the match.
intstart(int group) Returns the start index of the subsequence captured by the given group during this match.
default intReturns the start index of the subsequence captured by the given named-capturing group during the previous match operation.
-
Method Details
-
start
-
start
-
start
-
end
-
end
-
end
-
group
-
group
-
group
-
groupCount
-
namedGroups
-
hasMatch
-