There is an array with names (no matter what). There is a line 2016070100_2016080100_005.zip , which must be distinguished from the rest according to the mask. Now it looks like this to me

 Regex regex = new Regex(@"\*.zip"); 

but you need to look for not only .zip , but also 0_2016 .

    1 answer 1

     Regex regex = new Regex(@".+?0_2016.+\.zip"); 

    In addition, you can do without regular expressions by simply checking the occurrence of 0_2016 and .zip :

     if (str.Contains("0_2016") && str.EndsWith(".zip")) { // ... } 
    • Thank you. Very helpful. - Side Kick