I need a regex to return true for 01.mp4
- by Umair
I want to sort out specific files depending on their names, i want a regex that returns true for file names like : 01.mp4, 99.avi, 05.mpg.
the file extensions must match exactly to the ones that i want and the filename must start with characters which can not be longer than 2 characters. the first part is done but the file extensions aren't working. need some help
the regex that I have is
/^[0-9]{1,2}\.[mp4|mpg|avi]*/
but it also returns true for 01.4mp4, 01.4mp4m.