Skip to content

Instantly share code, notes, and snippets.

@edtoken
Created April 3, 2014 08:19
Show Gist options
  • Save edtoken/9950465 to your computer and use it in GitHub Desktop.
Save edtoken/9950465 to your computer and use it in GitHub Desktop.
var tmpRegex = new RegExp("(&page=)[0-9]+", 'ig');
var url = document.location.href;
newVal = '';
substrurl = url.replace(tmpRegex, '');
console.log(substrurl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment