title: Replace everything but number and >actual< decimal points
body: <p>I'm trying to get a regex working that will replace everything except for numbers and a decimal point (easy). The tricky part: the decimal point is optional but, if present, must be trailed by a further number.</p>
  
  <p>So:</p>
  
  <pre><code>.10 =&gt; 10
  10. =&gt; 10
  10.- =&gt; 10
  1.0 =&gt; 1.0
  </code></pre>
  
  <p>I'm not quite sure how to define the "except numbers followed by an optional decimal point but mandatory number after the optional decimal point" bit :)</p>
  
  <p>Thanks!</p>