title: Java regex: Get the matched sequence
body: <p>In Perl/PHP regex is's possible to match a sequence and get an array with matched sequences:</p>
  
  <pre><code>preg_match('/20[0-1][0-9]/', $inputstring, $array_return); // PHP
  </code></pre>
  
  <p>I can't figure out how to do this in Java. <code>match.group()</code> returns the whole string. </p>
  
  <p>Is this impossible?</p>