Skip to content

Instantly share code, notes, and snippets.

@amadeuszblanik
Last active January 15, 2020 17:43
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 amadeuszblanik/53e29b10f5751cd07d848f9ec0d87dcb to your computer and use it in GitHub Desktop.
Save amadeuszblanik/53e29b10f5751cd07d848f9ec0d87dcb to your computer and use it in GitHub Desktop.
Regular Expresions
/**
* Regular Expression
* for common use!
*
* @author Amadeusz Blanik
*/
const GoogleAnalytics = /^UA-\d{4,9}-\d{1,4}$/i;
const GoogleTagManager = /^GTM-[A-Z0-9]{1,7}$/i;
const FacebookPages = /(?:https?:\/\/)?(?:www\.)?facebook\.com\/(?:(?:\w)*#!\/)?(?:pages\/)?(?:[\w\-]*\/)*([\w\-\.]*)/ // @author https://gist.github.com/marcgg/733592
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment