I've changed my query parameters format from &Key=Value to /Key/Value.
Now I'm trying to parse them in the url using regex. Not sure what I'm doing wrong but this is my code
Example url path: http://localhost/MyApp/#!/Page1/SubPage1/SubPage2/Key/value-example
let re = new RegExp(`^.*/(Key)/([a-zA-Z0-9]+).*$`);
while (match = re.exec(url)) {
params[match[1]] = match[2];
}
It ends in a infinite loop
What am I doing wrong?