title: Using RegEx how do I remove the trailing zeros from a decimal number
body: <p>I'm needing to write some regex that takes a number and removes any trailing zeros after a decimal point. The language is Actionscript 3. So I would like to write:</p>
  
  <pre><code>var result:String = theStringOfTheNumber.replace( [ the regex ], "" );
  </code></pre>
  
  <p>So for example:</p>
  
  <p><code>3.04000</code> would be <code>3.04</code></p>
  
  <p><code>0.456000</code> would be <code>0.456</code> etc</p>
  
  <p>I've spent some time looking at various regex websites and I'm finding this harder to resolve than I initially thought.</p>