Last active
October 2, 2015 11:41
-
-
Save iampeterbanjo/5e0e2fa6feb972e72929 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// modified version of http://www.guffa.com/Programming_archive.aspx?id=16 | |
var getQuerystring = function (key, from){ | |
var re = new RegExp('(?:\\?|&)'+key+'=(.*?)(?=&|$)','gi') | |
, r = [] | |
, m | |
; | |
while ((m=re.exec(from)) != null) r.push(m[1]); | |
return (r.join(',') || '').replace('/',''); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment