using System; using System.Text.RegularExpressions; public class Test { public static void Main() { string text = "AB GHIJKLZ"; Match match = Regex.Match( Regex.Replace(text, @"^(.)(.{5})(.{6})(.)$", "$1,$2,$3,$4"), @"^[A-Z ],[A-Z]*[ ]*,[A-Z]*[ ]*,[A-Z ]$"); if (match.Success) { Console.WriteLine(text); } } }