Forum Discussion
Oct 14, 2015
BIG-IP : TCL to match member of set
F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi
There must be a better way :
if { ( $segments_count == 3 ) || ( $segments_count == 4 ) || ( $segments_count == 5 ) } {
if { [expr {$...
Kevin_Stewart
Oct 14, 2015Employee
Okay, so a few things:
Data groups are not all external. You can create internal data groups that also use the *class commands. This is by far the simplest option to achieve what you want for the string values.
The expr command is generally intended for math, so you don't need it to evaluate a string:
if { $name_first eq "John" }
You can do a single expr for multiple integer evaluation:
set var 4
if { [expr { ( $var >= 3) and ( $var <= 5 )}] } {
log local0. "match"
}
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