Skip to content

Instantly share code, notes, and snippets.

@delias
Forked from educartoons/get_id
Created November 7, 2018 04:04
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