@DoGood every time you are asking something, you should be polite and accept answers(vote up, i think and put green tick to this answer (under vote arrows))
var parts = url.split('/');
var lastpart = parts[parts.length -1];
You can use pop() as jmar said too, just remember that removes it from the array when you do it, so you can't use the pop method twice on the same array and get the same value.
/([^\/]+)$/str.substr(str.lastindexof('/'));something like this