Skip to content

Instantly share code, notes, and snippets.

@Zmetser
Created March 3, 2014 19:54
Show Gist options
  • Save Zmetser/9333261 to your computer and use it in GitHub Desktop.
Save Zmetser/9333261 to your computer and use it in GitHub Desktop.
https?:\/\/ // Required scheme. Either http or https.
(?:[a-z0-9-]+\.)? // Optional subdomain.
vimeo\.com\/ // Domain name.
(?: // Group path alternatives.
moogaloop.swf\?clip_id= // Either moogaloop.swf?clip_id=
|video\/ // or video/
)? // or nothing. End path alternatives.
(?:
channels\/ // channels/channel_name/
[^\/]+\/
)?
(?: // groups/group_name/videos/
groups\/
[^\/]+\/
videos\/
)?
([0-9]+) // $1: Video id is a number.
[?=&+%#!\-\w\.]* // Consume any URL (query) remainder.
/https?:\/\/(?:[a-z0-9-]+\.)?vimeo\.com\/(?:moogaloop.swf\?clip_id=|video\/)?(?:channels\/[^\/]+\/)?(?:groups\/[^\/]+\/videos\/)?([0-9]+)[?=&+%#!\-\w\.]*/i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment