javascript quicky

Soldato
Joined
6 Feb 2004
Posts
20,856
Location
England
i have some urls and i simply want to extract the number in bold.

htttp://userserve-ak.last.fm/serve/_/176111/The+Verve.jpg

how can i do that? :o

EDIT: i've very crudely managed to come up with this....

Code:
end = urls[i].lastIndexOf("/");
start = urls[i].lastIndexOf("/",end-1) + 1;
num = urls[i].substring(start,end);

if anybody has anything tidier?? :)
 
Last edited:
thanks for the tips. i've always known they're supremely powerful. it just makes my eyes glaze over looking at them. :D

one day.....:o
 
Back
Top Bottom