fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string text = "AB GHIJKLZ";
  9. Match match = Regex.Match(
  10. Regex.Replace(text, @"^(.)(.{5})(.{6})(.)$", "$1,$2,$3,$4"),
  11. @"^[A-Z ],[A-Z]*[ ]*,[A-Z]*[ ]*,[A-Z ]$");
  12. if (match.Success)
  13. {
  14. Console.WriteLine(text);
  15. }
  16. }
  17. }
Success #stdin #stdout 0.08s 37176KB
stdin
Standard input is empty
stdout
AB    GHIJKLZ