Regular Expressions 101

Community Patterns

123...6

get video id from youtube link

1

Regular Expression
Golang

`
^(?:https?:\/\/)?(?:(?:www\.)?youtube\.com\/(?:(?:v\/)|(?:embed\/|watch(?:\/|\?)){1,2}(?:.*v=)?|.*v=)?|(?:www\.)?youtu\.be\/)([A-Za-z0-9_\-]+)&?.*$
`
gmi

Description

no description available

Submitted by RyuaNerin - 8 years ago (Last modified 10 months ago)