Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Example :

I have a query :
JavaScript
?keyword=word&personcapacity=2

I need to recover this "word" by deleting ?keyword= and &personcapacity=2

but this word changes depending on the search performed

Do you think that a Regex in JS can be used ?

What I have tried:

I tried this but it does not work :

JavaScript
^[\?-z]{8}[\s-z]{8}
Posted
Updated 11-Dec-18 3:56am

1 solution

Google "read query string params javascript" and you'll find lots of solutions for this

Get Query String Parameters with JavaScript[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900