I want to match on http://www.xyz.com/abc/ with anything after "/abc/"
I want to match on
http://www.xyz.com/abc/QW with anything after "QW"
you may try scan command.
% set uri1 "/abc/anythig"
/abc/anythig
% scan $uri1 {/abc/%s} var1
1
% put $var1
anythig
iRules 101 - 16 - Parsing Strings with the TCL Scan Command by Jason Rahm
https://devcentral.f5.com/articles/irules-101-16-parsing-strings-with-the-tcl-scan-command
I want to match on any value @ the Query string "cal"
URI::query
https://devcentral.f5.com/wiki/iRules.URI__query.ashx
[root@ve11c:Active:In Sync] config tmsh list ltm rule qux
ltm rule qux {
when RULE_INIT {
set uri1 "/abc.aspx?cal=anything"
log local0. "URI is $uri1 and parameter cal value is [URI::query $uri1 cal]"
}
}
[root@ve11c:Active:In Sync] config tail -f /var/log/ltm
Apr 12 15:55:39 ve11c info tmm1[5649]: Rule /Common/qux : URI is /abc.aspx?cal=anything and parameter cal value is anything