using System; using System.Text.RegularExpressions; public class Test { public static void Main() { var text = "blah blah this is a this search engine blah"; var result = Regex.Match(text, @"this.*?engine", RegexOptions.Singleline | RegexOptions.RightToLeft)?.Value; Console.WriteLine(result); } }