public interface MatchResult extends MatchResult
This interface contains query methods used to determine the results of a match against a regular expression. The match boundaries, groups and group boundaries can be seen but not modified through a MatchResult.
Modifier and Type | Method and Description |
---|---|
int |
end(String groupName)
Returns the offset after the last character of the subsequence captured
by the given group during this match.
|
String |
group(String groupName)
Returns the input subsequence captured by the given group during the
previous match operation.
|
List<Map<String,String>> |
namedGroups()
Returns the named capture groups
|
List<String> |
orderedGroups()
Returns the named capture groups in order
|
int |
start(String groupName)
Returns the start index of the subsequence captured by the given group
during this match.
|
end, end, group, group, groupCount, start, start
List<String> orderedGroups()
List<Map<String,String>> namedGroups()
String group(String groupName)
groupName
- name of capture groupint start(String groupName)
groupName
- name of capture groupint end(String groupName)
groupName
- name of capture groupCopyright © 2017. All rights reserved.