fixed some formatting typos
[vimdoclet.git] / sample / java.util.regex.MatchResult.txt
blob159b2f0bb5b0242c8e521b6b9f04b4115c6b1ef4
1 *java.util.regex.MatchResult* *MatchResult* The result of a match operation.
3 public interface interface MatchResult
6 |java.util.regex.MatchResult_Description|
7 |java.util.regex.MatchResult_Fields|
8 |java.util.regex.MatchResult_Constructors|
9 |java.util.regex.MatchResult_Methods|
11 ================================================================================
13 *java.util.regex.MatchResult_Methods*
14 |java.util.regex.MatchResult.end()|Returns the offset after the last character 
15 |java.util.regex.MatchResult.end(int)|Returns the offset after the last charact
16 |java.util.regex.MatchResult.group()|Returns the input subsequence matched by t
17 |java.util.regex.MatchResult.group(int)|Returns the input subsequence captured 
18 |java.util.regex.MatchResult.groupCount()|Returns the number of capturing group
19 |java.util.regex.MatchResult.start()|Returns the start index of the match.
20 |java.util.regex.MatchResult.start(int)|Returns the start index of the subseque
22 *java.util.regex.MatchResult_Description*
24 The result of a match operation. 
26 This interface contains query methods used to determine the results of a match 
27 against a regular expression. The match boundaries, groups and group boundaries 
28 can be seen but not modified through a MatchResult. 
32 *java.util.regex.MatchResult.end()*
34 public int end()
36 Returns the offset after the last character matched. 
40     Returns: @return The offset after the last character matched 
42 *java.util.regex.MatchResult.end(int)*
44 public int end(int group)
46 Returns the offset after the last character of the subsequence captured by the 
47 given group during this match. 
49 Capturing groups are indexed from left to right, starting at one. Group zero 
50 denotes the entire pattern, so the expression m.end(0) is equivalent to 
51 m.end(). 
54     group - The index of a capturing group in this matcher's pattern 
56     Returns: The offset after the last character captured by the group, or -1 if the match 
57              was successful but the group itself did not match anything 
59 *java.util.regex.MatchResult.group()*
61 public |java.lang.String| group()
63 Returns the input subsequence matched by the previous match. 
65 For a matcher m with input sequence s, the expressions m.group() and 
66 s.substring(m.start(),m.end()) are equivalent. 
68 Note that some patterns, for example a*, match the empty string. This method 
69 will return the empty string when the pattern successfully matches the empty 
70 string in the input. 
74     Returns: The (possibly empty) subsequence matched by the previous match, in string form 
76 *java.util.regex.MatchResult.group(int)*
78 public |java.lang.String| group(int group)
80 Returns the input subsequence captured by the given group during the previous 
81 match operation. 
83 For a matcher m, input sequence s, and group index g, the expressions 
84 m.group(g) and s.substring(m.start(g),m.end(g)) are equivalent. 
86 Capturing groups are indexed from left to right, starting at one. Group zero 
87 denotes the entire pattern, so the expression m.group(0) is equivalent to 
88 m.group(). 
90 If the match was successful but the group specified failed to match any part of 
91 the input sequence, then null is returned. Note that some groups, for example 
92 (a*), match the empty string. This method will return the empty string when 
93 such a group successfully matches the empty string in the input. 
96     group - The index of a capturing group in this matcher's pattern 
98     Returns: The (possibly empty) subsequence captured by the group during the previous 
99              match, or null if the group failed to match part of the input 
101 *java.util.regex.MatchResult.groupCount()*
103 public int groupCount()
105 Returns the number of capturing groups in this match result's pattern. 
107 Group zero denotes the entire pattern by convention. It is not included in this 
108 count. 
110 Any non-negative integer smaller than or equal to the value returned by this 
111 method is guaranteed to be a valid group index for this matcher. 
115     Returns: The number of capturing groups in this matcher's pattern 
117 *java.util.regex.MatchResult.start()*
119 public int start()
121 Returns the start index of the match. 
125     Returns: The index of the first character matched 
127 *java.util.regex.MatchResult.start(int)*
129 public int start(int group)
131 Returns the start index of the subsequence captured by the given group during 
132 this match. 
134 Capturing groups are indexed from left to right, starting at one. Group zero 
135 denotes the entire pattern, so the expression m.start(0) is equivalent to 
136 m.start(). 
139     group - The index of a capturing group in this matcher's pattern 
141     Returns: The index of the first character captured by the group, or -1 if the match was 
142              successful but the group itself did not match anything