Title |
Test
Find
File Name
|
Expression |
^([a-zA-Z]:\\)?[^\x00-\x1F"<>\|:\*\?/]+\.[a-zA-Z]{3,4}$ |
Description |
This matches a valid windows filename. Not a valid path.I wanted something simple that covered all the bases |
Matches |
file.txt | fie.txt.pdf | file(with parenthesis).pdf |
Non-Matches |
*file.pdf | file.tx |
Author |
Rating:
Jose Paulino
|
Source |
|
Your Rating |
|
Title: This isn't even close
Name: KRowe
Date: 10/11/2015 11:54:48 AM
Comment:
Not only is file.tx valid but you are missing a ton of edge cases. See http://stackoverflow.com/a/62888/932549 for a more detailed discussion.