Skip to content

Instantly share code, notes, and snippets.

@MilenFrom
Last active August 8, 2017 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MilenFrom/e798c7642cefb45121ae75b87a0cbb84 to your computer and use it in GitHub Desktop.
Save MilenFrom/e798c7642cefb45121ae75b87a0cbb84 to your computer and use it in GitHub Desktop.
Regex patterns (facebook profile, vimeo, youtube etc..)
/*
Facebook - /((http|https):\/\/|)(www\.|)facebook\.com\/[a-zA-Z0-9.]{1,}/
Twitter - /((http|https):\/\/|)(www\.|)twitter\.com\/[a-zA-Z0-9.]{1,}/
Instagram - /((http|https):\/\/|)(www\.|)instagram\.com\/[a-zA-Z0-9.]{1,}/
IMDB url - /((http|https):\/\/|)(www\.|)imdb\.com\/[a-zA-Z0-9.]{1,}/
Vimeo - /((http|https):\/\/|)(www\.|)vimeo\.com\/[a-zA-Z0-9.]{1,}/
YouTube - /((http|https):\/\/|)(www\.|)youtube\.com\/[a-zA-Z0-9.]{1,}/
@TODO: Move those to regxr.com, or may be codepen, eh...
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment