I have a form and I upload a file and I have to verify that the filename has this format input##.txt, where ## are digits.
Until now I’ve had a validator on the upload input and the regular expression that I found is input\d{2}\.txt, but is not enough because the FileUpload control’s filename looks like this :
C:\Documents and Settings\xyz\Desktop\input01.txt
and I need to validate only the part with input01.txt.
Could anyone help me?
Try this: