I'm trying to extract the Vine ID from the following URL:
https://vine.co/v/Mipm1LMKVqJ/embed
I'm using this regex:
/v/(.*)/
and testing it here: http://regexpal.com/
...but it's matching the V and closing "/". How can I just get "Mipm1LMKVqJ", and what would be the cleanest way to do this in Node?
*non greedy, so(.*?). And like hwnd said, grab the sub-group.s = s.slice(s.indexOf("/v/") + 3); s.slice(0, s.indexOf("/"));I had my indices mixed up on the first version.