I have a List contain some strings inside like this and other data.
HwndWrapper[App.exe;;cda6c3f4-8c87-4b12-8f3d-5322ca90eeex]
HwndWrapper[App.exe;;cadac3f4-8c87-4b12-8q3d-1qwe2ca90eec]
HwndWrapper[App.exe;;c1b6a3s4-8c87-4b12-8f3d-2qw2ca90eeev]
My list: // Returns a list of WindowInformation objects with Handle, Caption, Class, // Parent, Children, Siblings and process information
List<WindowInformation> windowListExtended = WindowList.GetAllWindowsExtendedInfo();
The regular expresion to match is:
HwndWrapper\[App.exe;;.*?\]
Now for every match on the list. I need extract the string matched and run a process with every string extracted, Foreach or something like that.
Some help please.
Update: Thanks Altaris for the help, just need convert List to string
var message = string.Join(",", windowListExtended);
string pattern = @"HwndWrapper\[LogiOverlay.exe;;.*?]";
MatchCollection matches = Regex.Matches(message, pattern);