title: Regular expression does not match a number with e+ or e-
body: <p>I want to match any number with a regular expression. I have written this expression (added whitespace for readability):</p>
  
  <pre><code>( ([0-9]+(\.[0-9]*)?) | (\.[0-9]+) )( (e|E)(\+|\-)[0-9](\.[0-9])? )?
  </code></pre>
  
  <p>This would need to match any number in one of the following forms:</p>
  
  <ul>
  <li><code>12345</code></li>
  <li><code>12.345</code></li>
  <li><code>.12345</code></li>
  <li><code>12345.</code></li>
  <li><code>12e-345</code> or <code>12E-345</code></li>
  <li><code>12e+345</code> or <code>12E+345</code></li>
  </ul>
  
  <p>It matches the first four notations, but the last four (those with e- and e+) don't. What have I done wrong? Thanks in advance.</p>