title: javascript extract numbers from string not working
body: <p>i have a sample <code>str1</code> <code>"14 girls"</code> 
  <code>str2</code> <code>"178 guys"</code></p>
  
  <p>i tried the following in chrome console to extract the numbers 12 and 178, could anyone please tell me what went wrong?</p>
  
  <pre><code>str.match(/^\d{2}$/)  to get the number of girls i.e. `14`
  
  str.match(/^[0-9]{2}?$/)
  </code></pre>
  
  <p>What would be an easy way to get the numbers?</p>