A regular expression that matches all valid native video & audio links.
Feel free to modify the regex below to add new video/audio extensions.
/^https?:\/\/(.+\/)+.+(\.(avi|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4|ogg|mp3|oga|aac|mpeg|webm))$/i
Video Link Example:
- http://example.com/sample.mp4
- https://example.com/sample.avi
- https://example.com/sample.ogg
See Also:
- Youtube Video Link Regular Expression
- Vimeo Video Link Regular Expression
- Image Link Regular Expression
Rate This Regex
User Review
( votes)Expression Flags
Flags | Description |
---|---|
i |
Ignore case sensitive. |
g |
Allows global search. |
m |
Allows multiline search. |