I want to get the v=id from YouTube’s URL with JavaScript (no jQuery, pure JavaScript).
v=id
http://www.youtube.c
function youtube_parser(url){ var match = url.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/); return (match&&match[7].length==11)?match[7]:false; }
Shortest and Efficient