Bhavya Gandhi
Bhavya Gandhi

Reputation: 11

I am looking for a regex to pick up all the trailing 0s after decimal from any number along with the decimal

Looking to pick up all those 0s which doesn't add any value to a number:

I 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

Answers (0)

Related Questions