fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. namespace RegExApplication
  5. {
  6. public class Program
  7. {
  8. public static void Main(string[] args)
  9. {
  10.  
  11. var pattern = "^([A-Za-z0-9_]{4})_([A-Za-z0-9_]{4})$";
  12. var template = "ZZZZ_ss16";
  13. var replaceWith = "${1}0%$2";
  14.  
  15. var regex = new Regex(pattern);
  16.  
  17. Console.WriteLine(regex.Replace(template, replaceWith));
  18. }
  19. }
  20. }
Success #stdin #stdout 0.13s 24968KB
stdin
Standard input is empty
stdout
ZZZZ0%ss16