title: Find the last match with Java regex matcher
body: <p>I'm trying to get the last result of a match without having to cycle through .find()</p>
  <p>Here's my code:</p>
  <pre><code>String in = &quot;num 123 num 1 num 698 num 19238 num 2134&quot;;
  Pattern p = Pattern.compile(&quot;num ([0-9]+)&quot;);
  Matcher m = p.matcher(in);
  
  if (m.find()) {
       in = m.group(1);
  }
  </code></pre>
  <p>That will give me the first result.  How do I find the LAST match without cycling through a potentially huge list?</p>