Can some body help me, I'm new to c#, I know this question has been asked several times before. The code below is supposed to be looking for specific directories but it doesn't seem to match the regex. I have tested the expression on regex101.com and it worked fine.
matching string should return True: \TestData\FXLH_TestData
matching string should return False: \TestData\FXLH_TestData_manifest
string dirReg = "([A-Z]+_TestData)[^_manifest]";
foreach (string subDir in Directory.GetDirectories(target))
{
if (Regex.IsMatch(subDir, dirReg)
Console.WriteLine("success");
else
Console.WriteLine("fail");
}