I tried this :
But it isn’t working for some reason does anybody have a better alternative ?
I tried this :
But it isn’t working for some reason does anybody have a better alternative ?
Try like this
System.Text.RegularExpressions.Regex.Replace(YourString,"\.\d+","")
Regards
Sudharsan
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
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.