Forum Discussion
David_Noonan_67
Nimbostratus
Oct 08, 2007Syntax for "matches" and "matches_regex"
We've got an iRule that contains the following code. It works fine but I find the repetition offensive.
elseif {[HTTP::uri] contains "fx1"} {
use pool Xyzzy
}
elseif {[HTTP::uri]...
Deb_Allen_18
Oct 09, 2007Historic F5 Account
Looks like Joe fixed the character display substitution issue - thanks Joe!
Great points, hoolio. Definitely more optimal approach. I didn't realize you could use charsets with either string match or switch.
I just came back to point out that for the regex with braces, you can instead escape the [] with a backslash to prevent the interpreter from trying to execute as a command:
if {"testfx4xxx" matches_regex ".*\[1234\].*"} {
/deb
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