Regular Expressions 101

Library entries

Youtube video URL or empty

Vote

0

Regular Expression
javascript

/
(?:^$|^(?:https?:)?(?:\/\/)?(?:youtu\.be\/|(?:www\.|m\.)?youtube\.com\/(?:watch|v|embed)(?:\.php)?(?:\?.*v=|\/))([a-zA-Z0-9\_\-]{7,15})(?:[\?&][a-zA-Z0-9\_\-]+=[a-zA-Z0-9\_\-]+)*$)
/
mg

Description

Loading markdown...
Submitted by xeon927 on stackoverflow - 5 days ago