Forum Discussion
Nick_T1
Feb 18, 2016Nimbostratus
String match unexpected behavior
Hello all! I'm trying to implement string match for the following condition and am not coming up with the right combination of options and looking at tcl wiki didn't yield anything yet. In one irule ...
Kai_Wilke
Feb 18, 2016MVP
Hi Nick,
the command
[string match -nocase $test_path_regex $path]
isn't using RegEx. Its rather using a -glob
matching syntax (*
, ?
or [A-Za-z0-9]
wildcards). So just use...
set test_path_regex "/investing/general/2016/*.aspx"
set test_path_regex "/investing/general/2016/*.aspx*"
For more information: http://www.tcl.tk/man/tcl8.4/TclCmd/string.htmM34
General Note: You should avoid using RegEx in iRules as much as possible. Its terible slow and most of the stuff can be already done using -glob matchings.
Cheers, Kai
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