using System; using System.Text.RegularExpressions; public class Test { public static void Main() { string str = "We are living in a yellow submarine. We don't have anything else."; string result = Regex.Replace(str, "(?<=).*?(?=)", m => m.ToString().ToUpper()); Console.WriteLine(Regex.Replace(result, "", "")); Console.ReadLine(); } }