Forum Discussion
Robert_47833
Altostratus
Mar 04, 2013ambiguous option "-" in switch
switch -glob [HTTP::header "User-Agent"] { "*x*" - "*y*" - "*z*" { if {!([HTTP::cookie exists "ccc"]) or !([HTTP::cookie exists "jjj"])} { if {[HTTP::uri] contains "ooo"} { return } else { if {[HTTP:...
hoolio
Cirrostratus
Mar 04, 2013If the string you're checking starts with a hyphen it will be mis-interpreted as an option for switch. You can avoid this by using the -- option to terminate the options:
switch -glob -- [HTTP::header "User-Agent"] {
Aaron
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