I'm not sure how to escape '+' in regex. Plus can come multiple times in i
so we need to replace all +
in the string. Here's what I have:
i.replace(new RegExp("+","g"),' ').replace(new RegExp("selectbasic=","g"),'').split('&');
But this gives me this error:
See Question&Answers more detail:osUncaught SyntaxError: Invalid regular expression: /+/: Nothing to repeat