I have the following two urls:
url1 = http://localhost:8000/i/dashboard-view?
&level_to_load=1&click_value=%C2%AB%20backll%20Billing%20PartiesC2%
AB%20backll%20Billing%20Parties
url2 = http://localhost:8000/i/dashboard-view?&level_to_load=1
&click_value=%C2%AB%20backll%20Billing%20PartiesC2%AB%20backll%20Billing%20Parties
&new_value=2
I want to be able to pull out the part that contains "click_value=...".
The resulting two urls after the regular expression should then be:
url1 = http://localhost:8000/i/dashboard-view?&level_to_load=1
url2 = http://localhost:8000/i/dashboard-view?&level_to_load=1&new_value=2
The current regex I have is:
url.replace(/click_value=.+&/, '');
But it is obviously insufficient. What would be the correct regex here?