Multivalued attributes

Alan DeKok aland at
Thu Jul 31 10:33:49 CEST 2014

Herwin Weststrate wrote:
> That would make the following two expressions different:
>   if (Attr[*] !~ /regex/)
>   if (!(Attr[*] =~ /regex/))

  In general, != and !~ should be the same as !(.. == ) and !(.. =~)

> First one is true if any of the attributes doesn't match the regex, the
> second one if none of the attribute match the regex. I would expect them
> to return the same. There might be some rule or lemma in mathematical
> set theory here, but I'm not really sure about that (especially since
> that would probably require explicit any/all-modifiers).

  I'll try to remember my math.  I'm sure I had this in one of my degrees.

> About a year ago I was working on a small filtering language for an API
> which required multi-valued attributes. We changed the use of >, <, <=
> and >= to yield to syntax errors when combined with multi-valued
> attributes, because nobody here really knew what they were supposed to
> do in this context.

  Makes sense.

  Alan DeKok.

More information about the Freeradius-Users mailing list