woothemes/woocommerce — comment on commit ceff57323cdd0627bb51c4d31df6b0084cfddb9f
File:  line 0
By mikejolley:

The regex wasn't working for me earlier. When saving tax we save to 4 dp (in case we need higher precision) I like to trim off the trailing zeros- thas wasn't working with this particular regex, but it was with the rtrim.