I need to strip out the IDs of embedded youtube videos, so I have the url which is something like:
www.youtube.com/embed/[someID]&rel=0&controls=0&showinfo=0&frameborder=1&modestbranding=1
All I want is the [someID] string. I have declared an empty array to store the regex matches;
var videoID = [];
The closest I have come to a solution is:
videoID = videoID.match("embed/(\w*)");
but this results in the following:
video[0] ("embed/")
video[1] ()
url.split('&')[0].split('/').slice(-1)[0]