Wow, thanks for the detailed explanation ! 🙂
Currently, my data groups are not per customer, but rather per "item". So I have for example a data group that lists the allowed hostnames, i.e.:
customer1 : {"www.foo.com" "www.bar.com"}
customer1 : {"www.bar.com" "www.baz.com"}
etc.
a similar data group for accounts, etc.
So basically for every connection I need to lookup multiple data groups to get the data I need.
Like I mentioned in the original post, I found it possible to create a single data group based on a list of lists, per customer, such as:
customer1: { {"www.foo.com" "www.bar.com"} { "account1" "account2" } {".jpg" ".gif"} }
And then I access the different elements in that list by index, i.e. set accountslist [lindex $biglist $1], and then I use lsearch (without split) to check if a given account is in that list.
I will definitely look into your suggestion of using class match, thanks!
p.s. still, a shame that dict is not supported. Would have made it much easier for me...