Answers for "vaidate youtube url"

0

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;
}
Posted by: Guest on June-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language