3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $html = '<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.it/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=monte+rosa&amp;aq=&amp;sll=45.454082,9.213138&amp;sspn=0.009016,0.01929&amp;t=h&amp;gl=it&amp;ie=UTF8&amp;hq=&amp;hnear=Monte+Rosa,+Province+of+Varese,+Lombardy&amp;ll=45.690627,8.824349&amp;spn=0.008978,0.01929&amp;z=14&amp;iwloc=A&amp;output=embed"></iframe><br /><small><a href="https://maps.google.it/maps?f=q&amp;source=embed&amp;hl=en&amp;geocode=&amp;q=monte+rosa&amp;aq=&amp;sll=45.454082,9.213138&amp;sspn=0.009016,0.01929&amp;t=h&amp;gl=it&amp;ie=UTF8&amp;hq=&amp;hnear=Monte+Rosa,+Province+of+Varese,+Lombardy&amp;ll=45.690627,8.824349&amp;spn=0.008978,0.01929&amp;z=14&amp;iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small>'; preg_match('~iframe.*src="([^"]*)"~', $html, $result); var_dump($result);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { [0]=> string(427) "iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.it/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=monte+rosa&amp;aq=&amp;sll=45.454082,9.213138&amp;sspn=0.009016,0.01929&amp;t=h&amp;gl=it&amp;ie=UTF8&amp;hq=&amp;hnear=Monte+Rosa,+Province+of+Varese,+Lombardy&amp;ll=45.690627,8.824349&amp;spn=0.008978,0.01929&amp;z=14&amp;iwloc=A&amp;output=embed"" [1]=> string(325) "https://maps.google.it/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=monte+rosa&amp;aq=&amp;sll=45.454082,9.213138&amp;sspn=0.009016,0.01929&amp;t=h&amp;gl=it&amp;ie=UTF8&amp;hq=&amp;hnear=Monte+Rosa,+Province+of+Varese,+Lombardy&amp;ll=45.690627,8.824349&amp;spn=0.008978,0.01929&amp;z=14&amp;iwloc=A&amp;output=embed" }