Regular Expressions 101

Library entries

YouTube ID from URL parser

Vote

1

Regular Expression
pcre

~
(?:^|\W)(?:youtube(?:-nocookie)?\.com/(?:.*[?&]v=|v/|e(?:mbed)?/|[^/]+/.+/)|youtu\.be/)([\w-]+)
~
mg

Description

Loading markdown...
Submitted by anonymous - a year ago