Skip to content

Instantly share code, notes, and snippets.

@educartoons
Last active November 7, 2018 04:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save educartoons/d337fa7b15c98724a874d25eaab95953 to your computer and use it in GitHub Desktop.
Save educartoons/d337fa7b15c98724a874d25eaab95953 to your computer and use it in GitHub Desktop.
const str = window.location.href ;
const regex = /\/chaplains\/([0-9]{1,5})/g;
const results = regex.exec(str);
const id = results[1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment