- Regex replace specified text
- Regex rx = Regex(@"s+" + word + @"s+");
- str = rx.Replace(str, word2);
- Debug.Assert(Regex.Match(word, "^w+$").Success);
- string result = Regex.Replace(input, @"b" + word + @"b", word2);
- str = Regex.Replace(str ,@"(?<first>s+)" + word + @"(?<last>s+)","${first}" + word2 + "${last}");