Próbuję znaleźć najlepsze wyrażenie regularne, aby pobrać identyfikator wideo Vimeo z adresu URL.Pobierz identyfikator wideo z adresu Vimeo
przykładowe adresy URL:
https://vimeo.com/11111111
http://vimeo.com/11111111
https://www.vimeo.com/11111111
http://www.vimeo.com/11111111
https://vimeo.com/channels/11111111
http://vimeo.com/channels/11111111
https://vimeo.com/groups/name/videos/11111111
http://vimeo.com/groups/name/videos/11111111
https://vimeo.com/album/2222222/video/11111111
http://vimeo.com/album/2222222/video/11111111
https://vimeo.com/11111111?param=test
http://vimeo.com/11111111?param=test
Mój obecny regexp, który nie działa:
/http:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/
zabaw & test tutaj:http://jsbin.com/asuqic/1/edit?javascript,live
można użyć 'url.split ('/') plasterek (-1) [0] .split ('?') [0] ', lub czy regex jest wymaganiem? – Yoshi