How do I extract certain parts of a string from a whole string?
My string looks like:
&username=user&password=pass&client_id=cid&client_secret=secret&grant_type=password
I want to extract the username
and password
values into 2 variables.
These values can appear in any order in the string.