Reputation: 11
Looking to pick up all those 0s which doesn't add any value to a number:
1.000
should give .000
0.000
should give .000
0.0080
should give me 0
10
should remain 10
, only after the decimals I wantI tried couple of regex but they are not working correctly, please if anyone can support, would be really appreciated, thanks in advance.
Tried
(\.*?)(0+)$
but this is picking up 0s which are actually valuable like in 10
or 100
etc.
Upvotes: 1
Views: 42