A regular expression to match valid filenames. It can be used to validate filenames entered by a user of an application, or the filename of files uploaded from a scanner.
The expression ensures that your filename conforms to specific rules, including no leading or trailing spaces and no use of any characters besides the letters A-Z and numbers 0-9.
- Regex To Check If Are Allowed File Types
- Windows File Path Regular Expression
- Linux File Path Regular Expression
- Regex To Extract Filename From A Path