regex match and replace c# code example
Example 1: c# regex replace
Regex.Replace(
"input string", @"[a-zA-Z]+", "replace string"
);
Example 2: c# replace regex string
string pattern = @"\bwest\b";
string modifiedString = Regex.Replace(input, pattern, strReplacement, RegexOptions.IgnoreCase);