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.
A typical iframe associate link looks like this
<iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=GB&source=ac&ref=qf_sp_asin_til&ad_type=product_link&tracking_id=keepchickens-21&marketplace=amazon®ion=GB&placement=1473689309&asins=1473689309&linkId=2ee7072c3050c40cded9c2ecdb317332&show_border=true&link_opens_in_new_window=true&price_color=333333&title_color=0066c0&bg_color=ffffff">
</iframe>
This regexp
/(<iframe )(.*)(amazon.adsystem.com).*/
picks up everything except the closing iframe tag I have tried variations of
/(<iframe )(.*)(amazon.adsystem.com).*(</iframe>)/
But can't get it to work. Any ideas?