First, always parse HTML with a dedicated tool, see What is the best way to parse html in C#? for possible options.
Once the HTML is parsed you can get plain text to run your regex against.
You may still use your this.*?engine
regex but enable RegexOptions.RightToLeft
option, possibly coupled with RegexOptions.Singleline
to match really any chars between the two words:
var result = Regex.Match(text, @"this.*?engine", RegexOptions.Singleline | RegexOptions.RightToLeft)?.Value;
See the online regex demo.
As per the documentation, RegexOptions.RightToLeft
Gets a value that indicates whether the regular expression searches from right to left.
C# demo:
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); // => this search engine