Classes/Eel/YoutubeHelper.php
function parseID($url) {
        if (!$url) {
            return false;
        }
        $regs = array();
        if (preg_match('/(?<=(?:(?<=v)|(?<=i)|(?<=list))=)[a-zA-Z0-9-]+(?=&)|(?<=(?:(?<=v)|(?<=i)|(?<=list))\/)[^&\n]+|(?<=embed\/)[^"&\n]+|(?<=(?:(?<=v)|(?<=i)|(?<=list))=)[^&\n]+|(?<=youtu.be\/)[^&\n]+/im', $url, $regs)) {
            return $regs[0];
        }
        return $url;
    }
function parseID($url) {
        if (!$url) {
            return false;
        }
        $regs = array();
        if (preg_match('/(?<=(?:(?<=v)|(?<=i)|(?<=list))=)[a-zA-Z0-9-]+(?=&)|(?<=(?:(?<=v)|(?<=i)|(?<=list))\/)[^&\n]+|(?<=embed\/)[^"&\n]+|(?<=(?:(?<=v)|(?<=i)|(?<=list))=)[^&\n]+|(?<=youtu.be\/)[^&\n]+/im', $url, $regs)) {
            return $regs[0];
        }
        return $url;
    }
function parseID ( $ url ) { if ( ! $ url ) { return false ; } $ regs = array ( ) ; if ( preg_match ( '/(?<=(?:(?<=v)|(?<=i)|(?<=list))=)[a-zA-Z0-9-]+(?=&)|(?<=(?:(?<=v)|(?<=i)|(?<=list))\/)[^&\n]+|(?<=embed\/)[^"&\n]+|(?<=(?:(?<=v)|(?<=i)|(?<=list))=)[^&\n]+|(?<=youtu.be\/)[^&\n]+/im' , $ url , $ regs ) ) { return $ regs [ 0 ] ; } return $ url ; }
Get Youtube video id from url

@param string $url The URL

@return string the video id extracted from url
Get Youtube video id from url