Forum Discussion

cpt_ri_F5's avatar
Icon for Cirrostratus rankCirrostratus
Jun 19, 2024

LTM - iRule operator


We agree that I can simplify the line : 

(not [HTTP::header "str1"] equals "str2"))


[HTTP::header "str1"] ne "str2")


I have a doubt :

Thank you.

LTM - 15.x

3 Replies

  • 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

  • it is better to use gui based local traffic policy to avoid scripting typo