fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string txt = "~A.~ ( tilde, then any single upper case letter, then dot, then tilde)";
  9. string pattern = "~([A-Z])\\.~";
  10. string replacement = "~$1\u2006~";
  11. Regex rx = new Regex(pattern);
  12. string result = rx.Replace(txt, replacement);
  13. Console.WriteLine("Replacement String: {0}", result);
  14. }
  15. }
Success #stdin #stdout 0.05s 134720KB
stdin
Standard input is empty
stdout
Replacement String: ~A ~ ( tilde, then any single upper case letter, then dot, then tilde)