How to remove 0 after decimal places

I tried this :

image

But it isn’t working for some reason does anybody have a better alternative ?

HI @Ishan_Shelke

Try like this

System.Text.RegularExpressions.Regex.Replace(YourString,"\.\d+","")

Regards
Sudharsan

Hi @Sudharsan_Ka

You expression is removing all the digits after the decimal point. I need to only remove zeroes after the decimal.

Say 73.57000 should become 73.57

image

Hi,

Can you try the following expression?

System.Text.RegularExpressions.Regex.Replace(yourString,"\.0+\b|(?<=\.\d*?)0+\b","")

Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.