title: regex: get numbered capture of all numbers in a string
body: <p>How can capture all the numbers in a given string?  It shouldn't matter whether they are floating point numbers, integers, positive or negative.  It should capture 50 or 100.25 or 12345678 or -78.999 each as a numbered capture.</p>
  
  <p>My intent is to find and replace nth number in a string (autohotkey).</p>
  
  <p>The regex should capture ALL the matches into an array.</p>
  
  <p>So far, I've come up with this regex (which only seems to capture the first match):</p>
  
  <pre><code>[-+]?\d+(\.\d+)?
  </code></pre>
  
  <p>Here is my autohotkey function, if you be interested:</p>
  
  <pre><code>ReplaceNumber(whattext, instance, replacewith){
      numpos := regexmatch(whattext, "Ox)[-+]?\d+(\.\d+)?", thisnumber)
      returnthis := thisnumber.value(instance)
      return returnthis
  }
  </code></pre>