Forum Discussion
LTM - iRule operator
Hello,
We agree that I can simplify the line :
(not [HTTP::header "str1"] equals "str2"))
to
[HTTP::header "str1"] ne "str2")
I have a doubt : https://clouddocs.f5.com/api/irules/Operators.html
Thank you.
LTM - 15.x
- cpt_ri_F5
Cirrostratus
Hello, Thank you for your feedback,
Enes_Afsin_Al, why did you remove the quotes from str1?
zamroni777, the iRule editor also validates the syntax.
Thank you
it is better to use gui based local traffic policy to avoid scripting typo
Hi cpt_ri_F5,
You can use "ne" operator for string comparisons. The function of the following two lines is the same.
not ([HTTP::header str1] equals "str2") [HTTP::header str1] ne "str2"
eq ne: Boolean string equal and string not equal. Each operator produces a zero/one result. The operand types are interpreted only as strings
Recent Discussions
Related Content
* 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