Remove Unwanted Character

Hello guys,

I have a text which contain unwanted character, I want to remove that specifically

  1. i want to remove all the commas except from the numbers.

How can i remove the this, please suggest a solution.

Hi,

How about the following expression?

System.Text.RegularExpressions.Regex.Replace(yourString,"(?!<\d),(?!\d)","")

Regards,

@Gokul_Murali,

Use Regex this way

strOutput=System.Text.RegularExpressions.Regex.Replace(inputStr, "(?<!\d),(?!\d)", "")

Output:

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