Сообщение от JStudent
|
"https://www.dailymotion.com/video/x7diyrn > x7diyrn"
"https://www.youtube.com/watch?v=iQYiRwNd7ug > iQYiRwNd7ug"
"https://vimeo.com/348090448 > 348090448"
|
Предложу такой вариант...
getId('https://www.dailymotion.com/video/x7diyrn');
getId('https://www.youtube.com/watch?v=iQYiRwNd7ug');
getId('https://vimeo.com/348090448');
function getId(Url){
alert(Url.match(/[^\/=]+(?=$)/));
};