Forum Discussion
dlg_23340
Nov 23, 2011Cirrus
"class match starts_with" behavior
My own testing seems to indicate that the return of [class match -value -- $var starts_with data_group] returns the value of the longest key, but I can't find any documentation to support this. Can anyone provide the expected behavior in this case?
- nitassEmployee
i have seen ID222001 "class match" and "class search" need "-all" parameter which mentioning the first entry will be returned but as i tested, i got the same result as yours. not sure if i missed anything. does another guy get similar result??
- nitassEmployeei have seen ID222001 "class match" and "class search" need "-all" parameter which mentioning the first entry will be returnedsorry i was wrong. ID222001 is correct. what your finding is different one.
[root@ve1023:Active] config b rule myrule list rule myrule { when RULE_INIT { log local0. "foo: [class get foo]" for {set i 0} {$i < [class size foo]} {incr i} { log local0. "index$i: [class element $i foo]" } log local0. "\[class match -value abcdef starts_with foo\]: [class match -value abcdef starts_with foo]" log local0. "\[class search -value foo starts_with abcdef\]: [class search -value foo starts_with ab]" } } [root@ve1023:Active] config tail -f /var/log/ltm Nov 25 19:21:00 local/ve1023 err mcpd[21973]: 01020066:3: The requested rule (myrule) already exists in partition Common. Nov 25 19:21:00 local/tmm info tmm[23027]: Rule myrule : foo: {abc 111} {abcd 222} {ab 333} Nov 25 19:21:00 local/tmm info tmm[23027]: Rule myrule : index0: abc 111 Nov 25 19:21:00 local/tmm info tmm[23027]: Rule myrule : index1: abcd 222 Nov 25 19:21:00 local/tmm info tmm[23027]: Rule myrule : index2: ab 333 Nov 25 19:21:00 local/tmm info tmm[23027]: Rule myrule : [class match -value abcdef starts_with foo]: 222 Nov 25 19:21:00 local/tmm info tmm[23027]: Rule myrule : [class search -value foo starts_with abcdef]: 111
- dlg_23340CirrusWhat is ID222001?
- nitassEmployeehat is ID222001?it is a request to add -all parameter to return all matches when using class match or class search.
- dlg_23340CirrusOk, let me rephrase. Where do you find "ID222001"? Is that in internal F5 tracking ID?
- nitassEmployeeIs that in internal F5 tracking ID?yes, it is internal.
- dlg_23340CirrusPosted By nitass on 11/28/2011 06:24 AM
- nitassEmployeenot really. you may open a support case and ask for confirmation and/or document. they should be able to help you.
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