title: Removing trailing 0s from a String formatted decimal / Java error - Look-behind pattern matches must have a bounded maximum length near index 15
body: <p>I'm trying to match the last set of 0s in a decimal. Eg: In <code>9780.56120000</code> <code>0000</code> would be matched. This regex:</p>
  
  <p><code>(?&lt;=\.\d{0,20})0*$</code></p>
  
  <p>seems to work in RegexBuddy but Java fails with the following error:</p>
  
  <blockquote>
    <p>Look-behind pattern matches must have a bounded maximum length near
    index 15</p>
  </blockquote>
  
  <p>Can anyone provide some insight into this problem?</p>