title: Regex for removing all but the first number from a string
body: <p>I'm looking for a javascript replace regex that will strip out everything but the first number in a string. (The last will also work as well, see my test cases below)</p>
  <p>Given the following:</p>
  <pre><code>P1, PROTECTED 1
  or
  P3, PROTECTED 3
  or
  P10, PROTECTED 10
  </code></pre>
  <p>I need 1,3, or 10</p>
  <p>I need to only return the first or last number. It'll be between 1 and 10. They're the same.</p>
  <pre><code>var foo = 'P10, PROTECTED 10';
  foo.replace(/(\d+)/,'');
  </code></pre>
  <p>strips out the first number...I need the exact opposite</p>