Regex to validate image urls with query string
<p>I want to validate image urls, few with query string and few without it.
<a href="https://images.company.com/img/800X450/vehicle/201610/858823_589_1475572549658.gif?bg=000000&amp;wmi=n" rel="nofollow">https://images.company.com/img/800X450/vehicle/201610/858823_589_1475572549658.gif?bg=000000&amp;wmi=n</a></p>

<p><a href="http://images.company.com/img/800X450/vehicle/201610/858823_599_1475572549658.jpeg?bg=000000&amp;wmi=n&amp;pne=ur" rel="nofollow">http://images.company.com/img/800X450/vehicle/201610/858823_599_1475572549658.jpeg?bg=000000&amp;wmi=n&amp;pne=ur</a></p>

<p><a href="http://images.company.com/img/800X450/vehicle/201610/858823_599_1475572549658.png" rel="nofollow">http://images.company.com/img/800X450/vehicle/201610/858823_599_1475572549658.png</a></p>

<p>So basic thing is to validate any image with jpg|png|gif|jpeg extension, with or without query string parameter.</p>

<p>I tried using Matches(@".(?i)(jpg|png|gif|jpeg)") regex.</p>

<p>But problem is it is validating images like:
<a href="http://images.company.com/img/800X450/vehicle/201610/858823_599_1475572549658.pngg" rel="nofollow">http://images.company.com/img/800X450/vehicle/201610/858823_599_1475572549658.pngg</a>
OR
<a href="http://images.company.com/img/800X450/vehicle/201610/858823_599_1475572549658.giff" rel="nofollow">http://images.company.com/img/800X450/vehicle/201610/858823_599_1475572549658.giff</a></p>

<p>How can i validate if url has exact extension jpg or png or gif or jpeg and optionally some query string parameter after that?</p>