Lines Matching defs:group

76  * href="Pattern.html#cg">capturing group</a> in the pattern as well as a total
262 * captured by the given group during the previous match operation.
269 * @param group
270 * The index of a capturing group in this matcher's pattern
272 * @return The offset after the last character captured by the group,
274 * but the group itself did not match anything
281 * If there is no capturing group in the pattern
284 public int end(int group) {
286 return matchOffsets[(group * 2) + 1];
292 * group</a> during the previous match operation.
295 * The name of a named-capturing group in this matcher's pattern
297 * @return The offset after the last character captured by the group,
299 * but the group itself did not match anything
306 * If there is no capturing group in the pattern
320 * the expressions <i>m.</i><tt>group()</tt> and
335 public String group() {
336 return group(0);
340 * Returns the input subsequence captured by the given group during the
343 * <p> For a matcher <i>m</i>, input sequence <i>s</i>, and group index
344 * <i>g</i>, the expressions <i>m.</i><tt>group(</tt><i>g</i><tt>)</tt> and
350 * the expression <tt>m.group(0)</tt> is equivalent to <tt>m.group()</tt>.
353 * <p> If the match was successful but the group specified failed to match
356 * This method will return the empty string when such a group successfully
359 * @param group
360 * The index of a capturing group in this matcher's pattern
362 * @return The (possibly empty) subsequence captured by the group
363 * during the previous match, or <tt>null</tt> if the group
371 * If there is no capturing group in the pattern
374 public String group(int group) {
376 int from = matchOffsets[group * 2];
377 int to = matchOffsets[(group * 2) + 1];
387 * <a href="Pattern.html#groupname">named-capturing group</a> during the previous
390 * <p> If the match was successful but the group specified failed to match
393 * This method will return the empty string when such a group successfully
397 * The name of a named-capturing group in this matcher's pattern
399 * @return The (possibly empty) subsequence captured by the named group
400 * during the previous match, or <tt>null</tt> if the group
408 * If there is no capturing group in the pattern
412 public String group(String name) {
414 int group = getMatchedGroupIndex(pattern.address, name);
415 int from = matchOffsets[group * 2];
416 int to = matchOffsets[(group * 2) + 1];
431 * returned by this method is guaranteed to be a valid group index for
446 * <tt>start</tt>, <tt>end</tt>, and <tt>group</tt> methods. </p>
468 * <tt>start</tt>, <tt>end</tt>, and <tt>group</tt> methods. </p>
486 * <tt>start</tt>, <tt>end</tt>, and <tt>group</tt> methods, and subsequent
519 * <tt>start</tt>, <tt>end</tt>, and <tt>group</tt> methods. </p>
585 * {@link #group(int) group(g)</tt>} respectively. For <tt>$</tt><i>g</i><tt></tt>,
587 * the group reference. Subsequent numbers are incorporated into g if
588 * they would form a legal group reference. Only the numerals '0'
589 * through '9' are considered as potential components of the group
590 * reference. If the second group matched the string <tt>"foo"</tt>, for
632 * group that does not exist in the pattern
635 * If the replacement string refers to a capturing group
649 * the corresponding group's contents.
667 buffer.append(group(c - '0'));
675 buffer.append(group(namedGroupName));
978 if (matchFound && (group() != null)) {
979 sb.append(group());
1127 * Returns the start index of the subsequence captured by the given group
1135 * @param group
1136 * The index of a capturing group in this matcher's pattern
1138 * @return The index of the first character captured by the group,
1139 * or <tt>-1</tt> if the match was successful but the group
1147 * If there is no capturing group in the pattern
1150 public int start(int group) throws IllegalStateException {
1152 return matchOffsets[group * 2];
1158 * <a href="Pattern.html#groupname">named-capturing group</a> during the
1162 * The name of a named-capturing group in this matcher's pattern
1164 * @return The index of the first character captured by the group,
1165 * or {@code -1} if the match was successful but the group
1173 * If there is no capturing group in the pattern
1185 throw new IllegalArgumentException("No capturing group in the pattern " +
1227 public int start(int group) {
1228 return offsets[2 * group];
1237 public int end(int group) {
1238 return offsets[2 * group + 1];
1242 public String group() {
1243 return group(0);
1247 public String group(int group) {
1248 final int start = start(group);
1249 final int end = end(group);