Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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}");
Advertisement
Add Comment
Please, Sign In to add comment