Forum Discussion
Matt_Breedlove_
Jul 17, 2012Nimbostratus
switch glob tcl string match support
Hi All
When using switch -glob, I know it supports square bracket char ranges such as [a-f], but does it support either of these?
Either "a" or "d" or "f"
[a,d,f]
o...
Matt_Breedlove_
Jul 19, 2012Nimbostratus
Ah, think I figured out the issue. I've used switch's on URI's for a long time, but usually I don't double quote the URI in the match, but figured it was better to do that
It looks like that coupled with not having the trailing asterisk prior to the last double quote was causing those matches to fail if there was any other characters present in the URI. Originally I understand the trailing asterisk to be unnecessary as the match text was a subset of the real URI, but once I realised that the only matches that worked had the trailing asterisk that seemed to be the clear issue
so for all of these:
"/csp*kw=??aceb*k" -
they needed to be this:
"/csp*kw=??aceb*k*" -
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