Forum Discussion
How to get the vlaue of parameter in URL
Hello colleagues! How can I retrieve values from parameters in URL and set them to variables? For example STRING1 and STRING2 from the next URI "GET /trackers1?..........&utm_source=STRING1&utm_content=abcdef&wm=STRING2&..........."
Thank you!
2 Replies
- Thomas_Gobet
Nimbostratus
Hi,
I suggest you to use the split command.
If you already know parameters value it will be easier but what you have to use as a split decision is "?" for the first occurrence and "&" for others.The first "?" will give you only parameters, and then with "&" you will have your first "combo" parameter=value.
Here is an helpful link to play with the split command : http://tmml.sourceforge.net/doc/tcl/split.html
- v_sakalkin_9556
Nimbostratus
Hi Thomas! Thank you! I doesn't know the values, but I need only two parameters. First one is "utm_source=" and second one is "ws=".
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com