Reputation: 333
Need to remove everything between .jpg and > on all instances like these below:
So everything becomes .jpg>
Any suggestions using preg_replace?
Upvotes: 1
Views: 1618
Reputation: 2350
$str = '.jpg|500|756|20121231-just-some-image-3.jpg)%>';
preg_replace('/[^\.jpg][^>]+/', '', $str);
Upvotes: 0