Irule not matching the user-agent string "ms search"

Hi all, I have following iRule configured on LTM.

when HTTP_REQUEST { set uagent [string tolower [HTTP::header User-Agent]] if { $uagent contains “ms search”} { pool pool-A } else { pool pool-B } } the http requests with user-agent containing “ms search” is not getting matched and hence falling to pool-B.

Is there any significance of white space in “ms serach”

try adding some logging to see what’s coming though and see if that gives any indication. Something like this:

when HTTP_REQUEST {
    set uagent [string tolower [HTTP::header User-Agent]]
    log local0. "UA: '${uagent}'"

    if { $uagent contains "ms search"}  {
        log local0. "  No match"
        pool pool-A
    } else {
        log local0. "  Match found"
        pool pool-B
    }
}