Forum Discussion
hooleylist
Jul 06, 2009Cirrostratus
If you have any string in the format of ?name1=value1&name2=value2, you can use URI::query to parse the value of any of the parameters:
set my_uri "?action=login&pref=2"
log local0. "[URI::query $my_uri "action"]"
This would output "login". If you've already removed the question mark when parsing the URI string, you could prepend it:
set my_uri "action=login&pref=2"
log local0. "[URI::query "?$my_uri" "action"]"
Aaron