Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get youtube id from url javascript

<script type="text/javascript">
function youtube_parser(url){
    var regExp = /^.*((youtu.be/)|(v/)|(/u/w/)|(embed/)|(watch?))??v?=?([^#&?]*).*/;
    var match = url.match(regExp);
    return (match&&match[7].length==11)? match[7] : false;
}
</script>
Comment

PREVIOUS NEXT
Code Example
::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
Javascript ::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
::  
Javascript ::  
::  
::  
Javascript ::  
::  
::  
::  
::  
::  
ADD CONTENT
Topic
Content
Source link
Name
8+9 =