Regular Expressions 101

Library entries

Youtube video url matcher

Vote

0

Regular Expression
pcre

/
^(?:https?:\/\/)?(?:www\.)?(?:youtube\.com\/watch\?v=([a-zA-Z0-9_]+)|youtu\.be\/([a-zA-Z\d_]+))(?:&.*)?$
/
gm

Description

Loading markdown...
Submitted by anonymous - 2 years ago