ivanblue
asked on
Extracting ID from Vimeo URL using JavaScript
Hello, I'm using this code to extract the ID from a Vimeo URL:
And how does this code work? Can you explain it?
Thanks.
vimeo_id = message.split(/video\/|http:\/\/vimeo\.com\//)[1].split(/[?&]/)[0];
But this code doesn't work when there's https instead of http. How can I make it work with https too? I prefer to keep the split instead of using a regexp if possible.And how does this code work? Can you explain it?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did you check the link provided?
ASKER
Yes, now I did. Thanks leakim971!
ASKER
Thanks so much!