Forum Discussion
Ian_Stewart_390
Nimbostratus
May 06, 2005String 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
- JRahm
Admin
Use the backslash "\" - Ian_Stewart_390
Nimbostratus
That was it. Thank you. =)
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects