Forum Discussion
3 Replies
Sort By
- Andy_McGrathCumulonimbus
As long as those are path and not query values and always in the same location as your example the following will get the data values from within the path:
set valueA [getfield [getfield [HTTP::path] "/" 3] "=" 2] set valueB [getfield [getfield [HTTP::path] "/" 4] "=" 2]
- youssef1Cumulonimbus
Hi,
2 solutions for you:
First solution:
set uri [HTTP::uri] regexp {^.*valueA=([^\/]+)\/valueB=(.*)$} $uri -> valuea valueb
Second solution:
set uri [HTTP::uri] set valuea [findstr $uri /valueA= 8 /] set valueb [findstr $uri /valueB= 8 end]
Hope it will help you. keep me in touch.
regards,
- Stanislas_Piro2Cumulonimbus
Hi,
you can use scan command, faster than regexp...
scan [HTTP::uri] {/%[^/]/valueA=%[^/]/valueB=%[^/]} garbage valueA valueB