title: Java regex matcher doesn't group as expected
body: <p>I have a regex </p>
  
  <pre><code>.*?(\\d+.*?\\d*).*?-.*?(\\d+.*?\\d*).*?
  </code></pre>
  
  <p>I want to match any string that contains a numerical value followed by "-" and another number. Any string can be in between. </p>
  
  <p>Also, I want to be able to extract the numbers using group function of Java Matcher class.</p>
  
  <pre><code>Pattern pattern = Pattern.compile(".*?(\\d+.*?\\d*).*?-.*?(\\d+.*?\\d*).*?");
  Matcher matcher = pattern.matcher("13.9 mp - 14.9 mp");
  matcher.matches();
  </code></pre>
  
  <p>I expect this result:</p>
  
  <pre><code>matcher.group(1) // this should be 13.9 but it is 13 instead
  matcher.group(2) // this should be 14.9 but it is 14 instead
  </code></pre>
  
  <p>Any idea what I am missing?</p>