Note that there are some explanatory texts on larger screens.

plurals
  1. POFiltering out highest integer from an array of links
    primarykey
    data
    text
    <p>But of a confusing title so let me explain. I have an array of links like this:</p> <pre><code>http://somesite.com/videoplayback?ip=81.0.0.0&amp;sparams=id,expire,ip,ipbits,itag,algorithm,burst,factor&amp;fexp=905602&amp;algorithm=throttle-factor&amp;itag=34&amp;ipbits=8&amp;burst=40&amp;sver=3&amp;expire=1285056000&amp;key=yt1&amp;signature=690F9475D5288F3129F84364427B2B490B6ACE59.45C8F83DEE3DD361855B12AE538EA6349FF8EF9B&amp;factor=1.25&amp;id=d50e6528eb51ad54,18 http://somesite.com/videoplayback?ip=81.0.0.0&amp;sparams=id,expire,ip,ipbits,itag,algorithm,burst,factor&amp;fexp=905602&amp;algorithm=throttle-factor&amp;itag=18&amp;ipbits=8&amp;burst=40&amp;sver=3&amp;expire=1285056000&amp;key=yt1&amp;signature=A68EAA3F7A2ECA2BB2BD6C35BF443C03E4BB1172.AD2FF9FDAF046B23F789FE1A7F7882DF9A355DE4&amp;factor=1.25&amp;id=d50e6528eb51ad54,5 http://somesite.com/videoplayback?ip=81.0.0.0&amp;sparams=id,expire,ip,ipbits,itag,algorithm,burst,factor&amp;fexp=905602&amp;algorithm=throttle-factor&amp;itag=5&amp;ipbits=8&amp;burst=40&amp;sver=3&amp;expire=1285056000&amp;key=yt1&amp;signature=ABC8ACF6899C46CC992ECB5F6A6FD7E66383EA3D.0C8B707083203DC1153FB26586A94BFAC64D176B&amp;factor=1.25&amp;id=d50e6528eb51ad54 </code></pre> <p>If you look at the very end of those URL's, they have extensions like <code>,18</code>, <code>,5</code> and there is one last link with no extension like this at all.</p> <p>Now, I need to use the link that has the highest number on the end as possible later in my code. In this example I need to filter out the very first link, because it has the highest integer on the end (<code>18</code>).</p> <p>I would use a series of <code>if()</code> blocks, but in this case the integers on the end can change so that's not a good solution.</p> <p>So I basically need to go through my array, check which link has the highest integer at the end (note that it is only 2 digits in length) and then store it in another variable.</p> <p>Can anyone provide some sample/psudo code on how to effectively do this?</p> <p>Cheers.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload