Regular Expressions 101

Community Patterns

Video URL

1

Regular Expression
ECMAScript (JavaScript)

/
((http|https):\/\/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+~#?&//=]*(.webm|.mp4|.ogg)))
/

Description

Checks weather a url points to a HTML5 supported video.

Submitted by Pwed - 8 years ago