title: Regular expression to remove leading/trailing zeros from a string
body: <p>Is this the proper REGEX to remove trailing decimal and zeroes from a string? I can't get it to work. What am I missing?</p>
  
  <blockquote>
    <p>78.80 -> 78.8</p>
  </blockquote>
  
  <pre><code>str.replaceAll("^.0*$", "");
  </code></pre>
  
  <p>i need only 2 decimal points as well like 78.008 should be 78.01</p>
  
  <p>and if it is 78.10 the 78.1 only.</p>