using System; using System.Text.RegularExpressions; public class Test { public static void Main() { string myString = "words words words FIRSTPHRASE these words I want SECONDPHRASE but not these words"; string theWordsIWant = Regex.Replace(myString, @"^.*?FIRSTPHRASE\s*(.*?)\s*SECONDPHRASE.*$", "$1"); Console.WriteLine(theWordsIWant); } }