public String group(int group) {
        MemReg mr = bounds(group);
        if (mr == null) return null;
        return getString(mr.in, mr.out);
    }
public String group ( int group ) { MemReg mr = bounds ( group ) ; if ( mr == null ) return null ; return getString ( mr . in , mr . out ) ; }
Returns the input subsequence captured by the given group during the
previous match operation.

<p> For a matcher <i>m</i>, input sequence <i>s</i>, and group index
<i>g</i>, the expressions <i>m.</i><tt>group(</tt><i>g</i><tt>)</tt> and
<i>s.</i><tt>substring(</tt><i>m.</i><tt>start(</tt><i>g</i><tt>),</tt>&nbsp;<i>m.</i><tt>end(</tt><i>g</i><tt>))</tt>
are equivalent.  </p>

<p> <a href="Pattern.html#cg">Capturing groups</a> are indexed from left
to right, starting at one.  Group zero denotes the entire pattern, so
the expression <tt>m.group(0)</tt> is equivalent to <tt>m.group()</tt>.
</p>

<p> If the match was successful but the group specified failed to match
any part of the input sequence, then <tt>null</tt> is returned. Note
that some groups, for example <tt>(a*)</tt>, match the empty string.
This method will return the empty string when such a group successfully
matches the empty string in the input.  </p>

@param  group
The index of a capturing group in this matcher's pattern

@return  The (possibly empty) subsequence captured by the group
during the previous match, or <tt>""</tt> if the group
failed to match part of the input