Regular Expressions 101

Library entries

youtube links in wp/embed context

Vote

1

Regular Expression
pcre

/
(?<=(?:\[embed\])|(?:\[embed\]\s)|(?:))(https?:\/\/)(:?www\.)?(:?youtube\.com\/watch|youtu\.be\/)([\w\?=\&]+)(?=(?:\[\/embed\])|(?:\s\[\/embed\])|(?:))
/
gims

Description

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