i have a scenario where i will get input as path and query param and in the place of value i will get a regex.
regex input contains & which is a delimiter in query param.
`Input :` '/austin/query.html?dept=([^&]*)&group=([^&]*)'
i want to get this regex ([^&]*)
from query param dynamically.
Any idea or suggestions might be silly / basic question please do help ?
It's important to URL encode query parameters before the request is sent. This helps to avoid issues with characters that have special meaning (
?
,=
,&
,#
, etc.)So instead of sending literal ampersand characters
&
in the regex, it should be URL-encoded to be%26
instead.When this parsed by the
querystring
module, it will automatically be converted back to the ampersand character.