Forum Discussion
Neil_66348
Nimbostratus
Apr 30, 2010iRules - URI's with "FullStops" in
Hi guys ,
Hope someone can help here .
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"*/dev.inbound.prod.Portal*" {
pool Prod...
hoolio
Cirrostratus
May 04, 2010That's really odd. switch -glob should use the same logic as 'string match'. I don't think the period has any significance as a wildcard for string matching:
http://www.tcl.tk/man/tcl8.4/TclCmd/string.htmM35
I couldn't reproduce this non-matching of .'s using string match or switch in 10.1:
tclsh
% string match "a.b.c." "aabbcc"
0
% string match "a.b.c." "a.b.c."
1
when RULE_INIT {
log local0. "[string match "a.b.c." "a.b.c."]"
log local0. "[string match "a.b.c." "aabbcc"]"
switch -glob "a.b.c." {
"a.b.c." {
log local0. "matched a.b.c."
}
"aabbcc" {
log local0. "matched aabbcc"
}
default {
log local0. "no match"
}
}
}
: 1
: 0
: matched a.b.c.
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
