using System; using System.Text.RegularExpressions; public class Test { public static void Main() { var input = @"some textsome text"; var pattern = @""; Console.WriteLine(Regex.Match(input, pattern)); Console.WriteLine(Regex.Match(input, pattern).Groups[1]); } }