title: RegEx to match only numbers incorrectly matching
body: <p>I'm trying to use a regular expression in JavaScript to match a number or a number containing a decimal. The regular expression looks like <code>[0-9]+ | [0-9]* \. [0-9]+</code>.</p>
  
  <p>However, for some reason this <code>'1A'.match(/^[0-9]+|[0-9]*\.[0-9]+$/)</code> incorrectly finds a match. I'm not sure which part of the expression is matching the <code>A</code>.</p>