Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save fredchu/f9c6fe45ae16ec74bce2 to your computer and use it in GitHub Desktop.

Select an option

Save fredchu/f9c6fe45ae16ec74bce2 to your computer and use it in GitHub Desktop.
Regex for match key and value in url query string
var regex = /index=([^&]*)/;
// replace "index" with any query string key name you want
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment