Forum Discussion
Juha__Ranta_106
Nimbostratus
Jun 28, 2005How to iterate over DataGroup List elements ?
Hi,
How can I iterate / access elements of a datagroup ?
I have following 'string data group list' called 'my_str_class':
--- /config/bigip.conf ---
...
Juha__Ranta_106
Nimbostratus
Jun 29, 2005Could you implement a version of matchclass that would return the matching
value in 'class' instead returning numeric value (0, 1, ..)?
I would like to know which one of the datagrouplist (or class) elements matches and do some extra manipulations using that information..
--- Here is the doc for findclass ---
findclass
The findclass command searches a data group list for a member that starts with and returns the data-group member string. This is similar to the matchclass command, except that the member is not required to be equal; instead, the member is only required to start with the string and the command returns the entire member value.
The syntax of the findclass command is:
findclass [(separator)]
--------------------------------------
Correct me if I'm wrong, but I guess that in this case I cannot use 'findclass' command because the first argument (string) is 'longer' and the second argument (data group) contains the 'prefixes' that I need to match against.
It seems to me that commands..
set location [HTTP::header "Location"];
set matchidx [matchclass $location starts_with $::my_str_class];
..set variable '$matchidx' to index of matching element in my
datagroup list (class).
Is there some way to get the value of element $matchidx from class
or is it possible to make 'matchclass' return the value of matching
element (instead of index). ?
Thanks in advance, Juha
--
PS: Please put more effort on writing a complete iRule documentation.
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