title: How to read images from a folder based on regex in Directory.GetFiles in C#?
body: <p>I need to load the images from a folder based on the name.</p>
  
  <p>I am using regex to do the same, But instead of reading matching one it is reading all images inside the folder.</p>
  
  <p>Below is my code</p>
  
  <p>var maskImagePrefixName = "BCCasualCuffs_Back_Left_";</p>
  
  <p>Regex reg = new Regex(@"^^(?!" + maskImagePrefixName + ").*");</p>
  
  <p>var glowImagesByPrefix = Directory.GetFiles(Server.MapPath("/GlowImages/"), "*.png").Where(path => reg.IsMatch(path)).ToList();</p>
  
  <p>I have "BCCasualCuffs_Back_Left_glow.png" file inside directory and expected result is to read the same, but I am getting all the files.</p>
  
  <p>Can Anyone assist where I am missing?</p>