I wrote a very basic jquery script to obtain the src attribute from my img elements. Long story short, based on the number contained in the src attribute of my thumbnails, the code then uses that same id number to fetch the corresponding main image:
sample thumb src value: catalog/p1-t1.png | where p = piece and 1 = id, t1 = thumb 1
sample mainpic src value: catalog/p1-1.png | where p = piece and 1 = id, 2nd 1 = main pic for thumb 1
It all worked nicely up until single digit numbers became double digits and thus, using something like:
$string = $string.substring(12,13);
ceased to work (obvious yes).
I want to get from my thumb’s ‘catalog/p1-t1.png‘ src value the ‘1’ after the ‘t’, whether its t1 or t33 or t999.
Thanks in advance
G.Campos
A wild Regular Expression appears!
Oh and later a slightly less wild demo appears, I guess.