String Escape Sequence

Are there escape sequences for strings inside iRules?

For example, I want to search a TCP Payload, after a client makes his inital connection, for the string oi%{@"$.

However, iRules seems to recognize the quote marks and the bracket, and throws compile errors. But if I simplify the string to “oi”, it works fine.

when CLIENT_ACCEPTED {

TCP::collect 16

}

when CLIENT_DATA {

if { [TCP::payload] starts_with “oi” } {

pool comm_pool

}

else {

discard

}

}

How can I search the payload for the more complex string?

-Ian

Use the backslash “\”

when CLIENT_ACCEPTED {

TCP::collect 16

}

when CLIENT_DATA {

if { [TCP::payload] eq “oi\%\{\\@\”\$" } {

pool comm_pool

}

else {

discard

}

}

That was it. Thank you. =)

-Ian