Need to remove everything between .jpg and > on all instances like these below:

* .jpg|500|756|20121231-just-some-image-3.jpg)%>
* .jpg|500|729|)%>
* .jpg|500|700|)%>
* .jpg|500|756|test-43243.jpg)%>

So everything becomes .jpg>

Any suggestions using preg\_replace?
['https://Stackoverflow.com/questions/18861370', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1550196/']
```
preg_replace('/\.jpg[^>]+>/', '.jpg>', $your_string);

```
```
$str = '.jpg|500|756|20121231-just-some-image-3.jpg)%>';
preg_replace('/[^\.jpg][^>]+/', '', $str);

```