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:
Uncaught SyntaxError: Invalid regular expression: /+/: Nothing to repeat
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…