Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
<iframe.*?(width="[0-9]*")?\.?(height="[0-9]*")?\.*?src=".*?youtube\.com\/embed\/(\w*\-?\w*).*?(width="[0-9]*")?\.?(height="[0-9]*")?\.*?><\/iframe>
/
gim

Description

Youtube iframe regex last

Submitted by onigetoc - 8 years ago