简体   繁体   English

php-preg_replace需要快速帮助

[英]php - quick help needed with preg_replace

I'm parsing rss feeds however some feeds have what look to be blank images in them (from feedburner). 我正在解析rss提要,但是某些提要在其中看起来是空白图像(来自feedburner)。 Can somewhere help me out with a preg_replace command to find and remove an image tag structured like: 可以在某处通过preg_replace命令帮助我查找和删除结构如下的图像标签:

<img src="http://feeds.feedburner.com/sdfasdfsfd" height="1" width="1"/>

Thanks! 谢谢!

我猜“ sdfasdfsfd”是随机的:

$text = preg_replace( '#<img src="http://feeds.feedburner.com/[a-z]+" height="1" width="1"/>#i', '', $text );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM