Replace "." by ","

I have scraped some 10 data’s from pdf. In which one of the value contains two dots i want to replace only one of the dot by comma.

like-> 42.568.00 i have this kind of value i want to replace it to 42,568.00

please can any one help me.

Thanks in advance

1 Like

Hi @karan1

You can try using the split method using the delimiter of"." from that you can form your string again using the concatenation.

cheers :smiley:

Happy learning :smiley:


you can try Decimal.TryParse Method (String, NumberStyles, IFormatProvider, Decimal)
with globalization settings. It can help you to manipulate the values based on selected culture.

Check this MSDN article:


If you dont mind can i get regular expression for this problem. Because among the “two” dots i want to replace only “one” dot by comma. Just because of this reason i’m not able to write regular expression

please help me out

Thanks in advance

1 Like

Thanq i will check with this.

new Regex(".").Replace("42.568.00", ",", 1)