using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; public class Test { public static void Main() { var regex = new Regex(@"^(?P\.) # delimiter "." (?P\w+)$ # Root Symbol, at least 1 character )", RegexOptions.IgnorePatternWhitespace); } }