Convert regex matches to the list of strings

Convert regex matches to the list of strings

I'm trying to find equal sub-string in big list about 50 000 strings, this way fine:

I'm trying to find equal sub-string in big list about 50 000 strings, this way fine:

var results = myList.FindAll(delegate (string s) { return s.Contains(myString); });

but it also looks for sub-string with part of word, for example, if I'm looking for "you do" it founds also extra "you dont" because contains "you do..".

So, this answer to my previous question supposedly should work as i need, but I'm not sure, how to get strings list from regex matches for particular code:

foreach (string phrase in matchWordsList)
{
     foreach (string str in bigList)
     {
          string[] stringsToTest = new[] { phrase };
          var escapedStrings = stringsToTest.Select(s => Regex.Escape(s)); 
          var regex = new Regex("\\b(" + string.Join("|", escapedStrings) + ")\\b");
          var matches = regex.Matches(str);

 foreach (string result in matches) /// Incorrect: System.InvalidCastException 
 {
     resultsList.Add(result);
 }

}

Getting strings from matches directly to the list throws exception:

An unhandled exception of type 'System.InvalidCastException' occurred in test.exe
Additional information: Unable to cast object of type 'System.Text.RegularExpressions.Match' to type 'System.String'.

So, I'm trying to figure out, hot to convert var matches = regex.Matches(str); to the list

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

C/C++ vs. Rust: A developer’s perspective

In this post, you'll see the difference between Rust and C/C++ in a developer’s perspective

Compiled C# Linq expression and querying Mongo

I've inherited some code from a former employee that queries a mongo DB using compiled Linq expressions and the&nbsp;<a href="https://github.com/RobThree/MongoRepository" target="_blank">MongoRepository library</a>&nbsp;(which sits on top of the MongoDB C# driver).