title: Regex quantifier for repeat sequence
body: <p>This is $input:</p>
  
  <pre><code>The random 3x3 matrix is: 
  0.5673 -0.3193 0.7516 
  0.4423 0.6708 -0.6121 
  -0.9798 0.0217 -0.1712 
  Row 2 has the minimum sum of -1.1293
  </code></pre>
  
  <p>I want to get that 9 elements, row number and minimum sum.<br>
  This is pattern: </p>
  
  <pre><code>$pattern = '/[^\A]+(-?[01]\.\d{4})[^\Z]+Row (\d) has the minimum sum of (-?\d+\.\d{4})\Z/'
  </code></pre>
  
  <p>But I see it failed to return 9 elements, like: </p>
  
  <p>preg_match_all($pattern, $input, $matches) </p>
  
  <p>var_dump($matches)</p>
  
  <pre><code>array(4) {
    [0]=&gt;
    array(1) {
      [0]=&gt;
      string(141) "The random 3x3 matrix is:&lt;br&gt;0.5673 -0.3193 0.7516&lt;br&gt;0.4423 0.6708 -0.6121&lt;br&gt;-0.9798 0.0217 -0.1712&lt;br&gt;Row 2 has the minimum sum of -1.1293"
    }
    [1]=&gt;
    array(1) {
      [0]=&gt;
      string(6) "0.1712"
    }
    [2]=&gt;
    array(1) {
      [0]=&gt;
      string(1) "2"
    }
    [3]=&gt;
    array(1) {
      [0]=&gt;
      string(7) "-1.1293"
    }
  }
  </code></pre>
  
  <p>How to fix $pattern to get 9 elements separately.</p>