Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vaidate youtube url

function matchYoutubeUrl(url) {
    var p = /^(?:https?://)?(?:m.|www.)?(?:youtu.be/|youtube.com/(?:embed/|v/|watch?v=|watch?.+&v=))((w|-){11})(?:S+)?$/;
    if(url.match(p)){
        return url.match(p)[1];
    }
    return false;
}
Source by # #
 
PREVIOUS NEXT
Tagged: #vaidate #youtube #url
ADD COMMENT
Topic
Name
2+5 =