Forum Discussion
Christopher_J_B
Nimbostratus
Sep 22, 2010Attempting to remove newline/spaces from a HTTP:payload without sucess
I have an irule that parses http payload that contain xml using the findstr function; the problem is some vendors xml requests have spaces and/or newline characters which getting difficult to account ...
hoolio
Cirrostratus
Sep 22, 2010Hi Christopher,
Which LTM version are you testing this with?
The second string map syntax looks correct and works with tclsh:
% string map [list " " "" "\n" ""] "text with spaces followed by \
a new line"
textwithspacesfollowedbyanewline
I don't have access to a test box at the moment to try this with findstr. Can you separate the findstr and string map commands with another temporary variable and check whether it is actually the string map or findstr commands generating the syntax error?
If the issue is with the string map command, you could try an alternate syntax:
% string map [list { } {} \n {}] "string with spaces and \
new line
s...
"
stringwithspacesandnewlines...
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects