Skip to content

Instantly share code, notes, and snippets.

@ifthenelse
Created November 7, 2013 14:59
Show Gist options
  • Save ifthenelse/7355999 to your computer and use it in GitHub Desktop.
Save ifthenelse/7355999 to your computer and use it in GitHub Desktop.
var vimeoRegexp = /(?:https?\:)?\/\/(?:www\.|player\.)?vimeo.com\/(?:video\/|channels\/|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)/;
var vimeoVideoUrl = "//player.vimeo.com/video/2243632";
var vimeoVideoArray = vimeoRegexp.regexp(vimeoVideoUrl);
var vimeoVideoID = vimeoVideoArray[3];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment