string replace expression c# code example
Example 1: regex replace /
// replaces all / in a String with _
str = str.replace(/\//g,'_');
Example 2: c# replace regex string
string pattern = @"\bwest\b";
string modifiedString = Regex.Replace(input, pattern, strReplacement, RegexOptions.IgnoreCase);