想办法做到这一点,现在 425 和 350 可以是任何值,并用单引号或双引号引起来:
<?php
$embed = "<iframe width=\"425\" height=\"350\" frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='https://maps.google.com.br/maps?f=q&source=s_q&hl=pt-BR&geocode=&q=R.+Alm%C3%A9ria,+242+-+Penha,+S%C3%A3o+Paulo+-+S%C3%A3o+Paulo&aq=0&oq=Rua++Almeria&sll=-14.239424,-53.186502&sspn=79.602428,135.263672&t=h&ie=UTF8&hq=&hnear=R.+Alm%C3%A9ria,+242+-+Penha,+S%C3%A3o+Paulo,+03654-000&z=14&ll=-23.524401,-46.518859&output=embed'></iframe><br /><small><a href='https://maps.google.com.br/maps?f=q&source=embed&hl=pt-BR&geocode=&q=R.+Alm%C3%A9ria,+242+-+Penha,+S%C3%A3o+Paulo+-+S%C3%A3o+Paulo&aq=0&oq=Rua++Almeria&sll=-14.239424,-53.186502&sspn=79.602428,135.263672&t=h&ie=UTF8&hq=&hnear=R.+Alm%C3%A9ria,+242+-+Penha,+S%C3%A3o+Paulo,+03654-000&z=14&ll=-23.524401,-46.518859' style='color:#0000FF;text-align:left'>Exibir mapa ampliado</a></small>";
var_dump($embed);
$new = preg_replace("/\bwidth='(.*?)'/", "width='100'", $embed);
$new2 = preg_replace("/\bheight='(.*?)'/", "height='100'", $new);
$new3 = preg_replace("/\bwidth=\"(.*?)\"/", "width='100'", $new2);
$new4 = preg_replace("/\bheight=\"(.*?)\"/", "height='100'", $new3);
var_dump($new4);
?>