13-May-2020 03:39
Hi
I am trying to replace a sentence which has space in between , how do I do it with stream? I just want to replace that sentence alone and not where ever the words in the sentence appear. Currently only single words are getting replaced with the format mentioned in the profile documentations.
01-Jun-2020
12:11
- last edited on
04-Jun-2023
21:26
by
JimmyPackets
Hello,
Could you write some example that you are expecting to reach?
e.g.
In case I need to search for "word and space" and replace with "onlyword" string, I do this way:
when HTTP_REQUEST {
HTTP::header remove "Accept-Encoding"
STREAM::disable
}
when HTTP_RESPONSE {
if { [HTTP::header value Content-Type] contains "text" } {
STREAM::expression {@word\sand\sspace@onlyword@}
STREAM::enable
}
}
Regards.