[ create a new paste ] login | about

Link: http://codepad.org/YVjjxOGt    [ raw code | output | fork ]

PHP, pasted on Feb 1:
1
2
3
4
5
6
7
8
9
<?php

$string = 'this is <p>
<iframe width="425" height="350" src="http://maps.google.com/maps/ms?hl=en&amp;mpa=0&amp;ctz=-60&amp;mpf=0&amp;ie=UTF8&amp;msa=0&amp;t=m&amp;vpsrc=6&amp;msid=207463975658802969656.0004b1369c88b98702faa&amp;ll=44.705998,8.068085&amp;spn=0.085403,0.145912&amp;z=12&amp;iwloc=0004b136a142301cefe0c&amp;output=embed"></iframe>
<br><small>View <a href="http://maps.google.com/maps/ms?hl=en&amp;mpa=0&amp;ctz=-60&amp;mpf=0&amp;ie=UTF8&amp;msa=0&amp;t=m&amp;vpsrc=6&amp;msid=207463975658802969656.0004b1369c88b98702faa&amp;ll=44.705998,8.068085&amp;spn=0.085403,0.145912&amp;z=12&amp;iwloc=0004b136a142301cefe0c&amp;source=embed">Test</a>
in a larger map</small>
</p>SPARTA! ;)';

echo preg_replace("#<p>(.*)<iframe(.*?)maps.google.com(.*?)</iframe>(.*)</p>#is", '', $string);


Output:
1
this is SPARTA! ;)


Create a new paste based on this one


Comments: