File & Pathflags: i
Video File Extension
Match common video file extensions: mp4, mov, avi, mkv, webm, m4v, flv, wmv, mpg, mpeg.
Try it in RegexPro →Available in
Pattern
regexengine-agnostic
\.(mp4|mov|avi|mkv|webm|m4v|flv|wmv|mpg|mpeg)$ (flags: i)Raw source: \.(mp4|mov|avi|mkv|webm|m4v|flv|wmv|mpg|mpeg)$
How it works
\. matches the literal dot. The alternation covers the most common video container formats. The trailing $ anchors to end-of-string so we don't match `.mp4` mid-filename. The i flag makes matching case-insensitive (.MOV, .Mp4, etc.).
Examples
Input
movie.mp4Matches
.mp4
Input
footage.MOVMatches
.MOV
Input
song.mp3No match
—Common use cases
- •Upload validation for media platforms
- •Build pipeline asset routing
- •Storage bucket lifecycle rules
- •Transcoding job dispatch by source format