Forum Discussion

v_sakalkin_9556's avatar
v_sakalkin_9556
Icon for Nimbostratus rankNimbostratus
Sep 24, 2014

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

  • 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

     

  • 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=".