using System; using System.Linq; using System.Text.RegularExpressions; public class Test { public static void Main() { var text = "Write your letter in the sand"; var test = Regex.Replace(text, @"^\w+\W+(\w)", x => x.Groups[1].Value.ToUpper()); Console.WriteLine(test); } }