Hi I have a regular expression which is strated failing now. not sure what is stopping.
Regex regex = new Regex(@"^(([a-zA-Z]:)|(\\{2}\w+\\[\w- ]+[$])|(\\{2}\w+))(\\[\w-. ]*)*(.xml|.XML)$");
if (!regex.IsMatch(fuSource.PostedFile.FileName))
{
Page.Validators.Add(new ValidatorHelper("Please select a valid Application XML input file."));
}
the file name i am passing is:
XX2 03-01-2017.xml
But for some reason it is not taking.
please help with the valid file name that matches the pattern..