I have a url...
/pensieve/q/22749623
I want to strip this url of everything but the tailing id and store it in a variable...
22749623
I am able to do this using a simple for loop...
var query_id = ''
for(var index = 12; index < query_url.length; index++){
query_id += query_url[index];
}
var query_id = parseInt(query_id);
How do I do this with Javascript using regex?
I am finding a lot about how to do this in other languages, but not Javascript. I have checked StackOverflow and the rest of the internet to no avail.