Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(<iframe.*?(?:www\.)?(?:youtu\.be|youtube.*?\.com)\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=)?((?:[\w-]{11})).*?>.*?\n*?<\/iframe>)
/
g

Description

Youtube Iframes to Shortcode

Submitted by anonymous - 7 years ago