Не используйте регулярное выражение, пожалуйста:
$dom_document = new DOMDocument();
$dom_document->loadHTML($html);
//use DOMXpath to navigate the html with the DOM
$dom_xpath = new DOMXpath($dom_document);
// if you want to get the all the iframes
$iframes = $dom_xpath->query("//iframe");
if (!is_null($iframes)) {
foreach ($iframes as $iframe) {
if($iframe->hasAttributes()){
$attributes = $iframe->attributes;
if(!is_null($attributes)){
foreach ($attributes as $index=>$attr){
if($attr->name == 'src'){
$curSrc = $attr->value;
//use regex here to extract what you want
}
}
}
}
}
}
Не полное решение. Но вы поняли ...