Forum Discussion
Rico
Feb 01, 2019Cirrus
You can use getfield to return a specific part of the URI like this:
set var [getfield [HTTP::uri] "/" 2]
This will return abc in your case
Or if you want to strip out/modify specific parts if the URI, you can use the split command to return a list of elements like this:
set elements [split [HTTP::uri] "/"]
set e1 [lindex $elements 0]
set e2 [lindex $elements 1]
set e3 [lindex $elements 2]
set e4 [lindex $elements 3]
In your case e1 would be empty, e2 would be abc, e3 would be garbage, and e4 would be moregarbage
If you have any more questions, I am sure I can help