Skip to content

Instantly share code, notes, and snippets.

View gurupras's full-sized avatar

Guru Prasad gurupras

View GitHub Profile
@gurupras
gurupras / youtubeID.js
Created September 13, 2016 06:12 — forked from takien/youtubeID.js
Get YouTube ID from various YouTube URL using JavaScript
/**
* Get YouTube ID from various YouTube URL
* @author: takien
* @url: http://takien.com
* For PHP YouTube parser, go here http://takien.com/864
*/
function YouTubeGetID(url){
var ID = '';
url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);