次のようなYouTubeのURLから文字列を取得する必要があります。
http://www.youtube.com/embed/WJlfVjGt6Hg?list=EC1512BD72E7C9FFCA&hl=en_US
"../embed/ " と "?list=.." の間の変数を取得する必要があります (-> WJlfVjGt6Hg )。
他の YouTube URL のコードは次のようになります。
// Checks for YouTube iframe, the new standard since at least 2011
if ( !isset( $matches[1] ) ) {
preg_match( '#https?://www\.youtube(?:\-nocookie)?\.com/embed/([A-Za-z0-9\-_]+)#', $markup, $matches );}
どうやってやるの ?