Replace multiple values in a string

Replace multiple values in a string

using System.Text.RegularExpressions;

string Name=”India’an/dt/heWorl’d”;
//specify the characters to be replaced.here it will be replaced by blank
Regex.Replace(actualvalue[0].Trim(), @"[/,’ ]"," ").ToString()

Ouput- India an dt heWorl d

1 comment: