com.google.code.regexp
Interface MatchResult

All Superinterfaces:
MatchResult

public interface MatchResult
extends MatchResult

The result of a match operation.

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.

Since:
0.1.9

Method Summary
 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.
 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.
 
Methods inherited from interface java.util.regex.MatchResult
end, end, group, group, groupCount, start, start
 

Method Detail

orderedGroups

List<String> orderedGroups()
Returns the named capture groups in order

Returns:
the named capture groups

namedGroups

Map<String,String> namedGroups()
Returns the named capture groups

Returns:
the named capture groups

group

String group(String groupName)
Returns the input subsequence captured by the given group during the previous match operation.

Parameters:
groupName - name of capture group
Returns:
the subsequence

start

int start(String groupName)
Returns the start index of the subsequence captured by the given group during this match.

Parameters:
groupName - name of capture group
Returns:
the index

end

int end(String groupName)
Returns the offset after the last character of the subsequence captured by the given group during this match.

Parameters:
groupName - name of capture group
Returns:
the offset


Copyright © 2013. All Rights Reserved.