| Title |
Test
Find
Check filename extensions
|
| Expression |
^.*(([^\.][\.][wW][mM][aA])|([^\.][\.][mM][pP][3]))$ |
| Description |
Matches a file name to be either a .wma or .mp3 file. This can be used to check file uploads to make sure they are of a certain type. Substitute letters where appropriate for specific file types. This is a better solution (I think) than #343. Works in Javascript and C#. |
| Matches |
|
| Non-Matches |
whatever.exe | somethingelse.mpa | thisagain.wm3 | filenamemp3 | filename..mp3 | filename.wmap3 |
| Author |
Rating:
Not yet rated.
Dusan Hlavaty
|
| Source |
my own expression |
| Your Rating |
|
Title: It not quite correct
Name: M.R.
Date: 11/4/2010 4:23:10 PM
Comment:
It validates also files like mp3test.exe
This is a serious problem when uploading files on a server...
Regards,
M. R.