I have next html code:
<table>
<tr><td><input type="radio" name="download" value="https://cdn.pixabay.com/photo/2018/04/17/00/42/water-3326310_640.jpg"> 640×425</td><td>JPG</td><td>48 kB</td></tr>
<tr><td><input type="radio" name="download" value="water-3326310_1280.jpg" data-perm="check"> 1280×851</td><td>JPG</td><td>158 kB</td></tr>
<tr><td><input type="radio" name="download" value="water-3326310_1920.jpg" data-perm="check"> 1920×1277</td><td>JPG</td><td>335 kB</td></tr>
<tr class="no_default"><td><input type="radio" name="download" value="water-3326310.jpg" data-perm="auth"> 4256×2832</td><td>JPG</td><td>2.1 MB</td></tr>
</table>
I know resolution and now I need to get value based on resolution. On example for 1920×1277 it would be water-3326310_1920.jpg
How I can do this with regex, I never had need to select value in backward. I tried this:
Regex n2 = new Regex(@"value=""(.+?) 1920×1279");
But the problem is that we have multiple value=""
and it will start from the first one which makes it impossible to recognize the right value.
BTW HTML is in one line since I did:
string i = Regex.Replace(x, "(?:\r?\n|\r)+", "");
It's easier to do regex in one line.