Guest User

Untitled

a guest
Jun 14th, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Regex replace specified text
  2. Regex rx = Regex(@"s+" + word + @"s+");
  3. str = rx.Replace(str, word2);
  4.  
  5. Debug.Assert(Regex.Match(word, "^w+$").Success);
  6.  
  7. string result = Regex.Replace(input, @"b" + word + @"b", word2);
  8.  
  9. str = Regex.Replace(str ,@"(?<first>s+)" + word + @"(?<last>s+)","${first}" + word2 + "${last}");
Advertisement
Add Comment
Please, Sign In to add comment