Hi,
I need to delete a substring from [HTTP::payload] before I pass it on for load-balancing but am running into problems with the error "char map list unbalanced ..
I need to strip two strings out completely and have tried using “string map” and “string replace” - this works fine when substituting for another string but not when substituting an empty string or tab / newline character ..
Surely there must be a simple way to do this ?!
Thanks!
e.g. the following works fine for “xyz” but fails for “”
set strSubstitute ""
set strSubstitute "xyz"
set strHTTPPayload [HTTP::payload]
set strHTTPPayload [ string map -nocase "$strOne $strSubstitute" $strHTTPPayload ]
set strHTTPPayload [ string map -nocase "$strTwo $strSubstitute" $strHTTPPayload ]