Hello, i need to always remove dot and comma from a provided string(different value every time), and the string also doesnt always show the dot and comma on the same position. How do I use Replace function to detect both comma and dot? I tried strText.Replace(“,.”,“”) but it didnt work, should I use strText.Replace(“,”,“”).Replace(“.”,“”) ? Will it work this way??
The second method is correct
Str.Replace(".","").Replace(",","")
Or there is a regex replace as well
Regex.Replace(str,"[.,]","")
This is using regular expressions
Cheers
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.