Preg_replace for a specific iframe : <p>Writing a quick plugin to strip Amazon associate links out of emails and feed to not brake the terms ofservice. Worked it all out apart from the iframe.</p>

<p>A typical iframe associate link looks like this</p>

<pre><code> &lt;iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&amp;OneJS=1&amp;Operation=GetAdHtml&amp;MarketPlace=GB&amp;source=ac&amp;ref=qf_sp_asin_til&amp;ad_type=product_link&amp;tracking_id=keepchickens-21&amp;marketplace=amazon&amp;region=GB&amp;placement=1473689309&amp;asins=1473689309&amp;linkId=2ee7072c3050c40cded9c2ecdb317332&amp;show_border=true&amp;link_opens_in_new_window=true&amp;price_color=333333&amp;title_color=0066c0&amp;bg_color=ffffff"&gt;
&lt;/iframe&gt; 
</code></pre>

<p>This regexp </p>

<pre><code>/(&lt;iframe )(.*)(amazon.adsystem.com).*/
</code></pre>

<p>picks up everything except the closing iframe tag
I have tried variations of </p>

<pre><code>/(&lt;iframe )(.*)(amazon.adsystem.com).*(&lt;/iframe&gt;)/
</code></pre>

<p>But can't get it to work. Any ideas?</p>
