title: How to extract three values with a ruby regular expression
body: <p>Given text with several numbers such as </p>
  
  <pre><code>showing 1 - 20 of 25 records
  </code></pre>
  
  <p>how could I use a regex to extract all the numbers? I would like an expression we could easily use with 'n' numbers.</p>
  
  <p>I can simply use</p>
  
  <pre><code>\d
  </code></pre>
  
  <p>to identify the three numbers, but then I am stuck on how to pick each.</p>
  
  <p>So far, I have</p>
  
  <pre><code> \b\d\b 
  </code></pre>
  
  <p>for the first, and</p>
  
  <pre><code>(\d+)(?!.*\d)
  </code></pre>
  
  <p>for the last, but I can't figure out the middle.</p>