I'm getting the RSS feeds from a wordpress blog where I get the thumbnail image in the string. Below is the sample feed i get
<img src="http://www.example.com/some-image.jpg?resize=50%2C50" class="attachment-thumbnail wp-post-image" alt="SomeImage" style="margin:0px;" />
I need to remove "?resize=50%2C50" from the image source. But the problem is I can't hardcode this in my code as the size may not remain the same. Also the order in which the attributes are placed may change
How can I simply remove anything that matches this pattern so that I can always get the output as
<img src="http://www.example.com/some-image.jpg" class="attachment-thumbnail wp-post-image" alt="Some Image" style="margin:0px;" />
Thanks in advance
?is still there, i.e.some-image.jpg?" class="