You have the dialog filterformat.
The extensions already appear twice (first appearance is unreliable) and when you try to handle this with a RegEx directly you'll have to think about
Text.Files (.prn;.txt;.rtf;.csv;.wq1)|.prn;.txt;.rtf;.csv;.wq1|
etc.
It looks safer to follow the known structure:
string filter = "Text Files (.prn;.txt;.rtf;.csv;.wq1)|.prn;.txt;.rtf;.csv;.wq1|PDF Files (.pdf)|.pdf|Excel Files (.xls;.xlsx;.xlsm;.xlsb;.xlam;.xltx;.xltm;.xlw)";
string[] filterParts = filter.Split("|");
// go through the odd sections
for (int i = 1; i < filterParts.Length; i += 2)
{
// approx, you may want some validation here first
string filterPart = filterParts[i];
string[] fileTypes = filterPart.Split(";");
// add to collection
}
This (only) requires that the filter string has the correct syntax.