foreach attribute array

2010-05-07 Thread Aaron Paetznick
I'm having some trouble working with attribute arrays. My Cisco NASes don't seem to always want to send their Cisco-AVPair attribute in the same order, so I can't be sure I want to reference %{Cisco-AVPair[0]}, or %{Cisco-AVPair[1]}, or other positions. So far, I've worked around this by

Re: foreach attribute array

2010-05-07 Thread Arran Cudbard-Bell
Is there a way to do a each, while, for, or foreach on an attribute array? Not in unlang no, there are no looping structures of any kind. -Arran - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: foreach attribute array

2010-05-07 Thread Aaron Paetznick
Aw. Thanks anyways though. I guess I'll just add a few more 'or's. --Aaron On 05/07/2010 04:26 PM, Arran Cudbard-Bell wrote: Is there a way to do a each, while, for, or foreach on an attribute array? Not in unlang no, there are no looping structures of any kind. -Arran - List

Re: foreach attribute array

2010-05-07 Thread Arran Cudbard-Bell
On May 7, 2010, at 3:20 PM, Aaron Paetznick wrote: Aw. Thanks anyways though. I guess I'll just add a few more 'or's. Easiest way to do what you're doing is to implode all the variable instances. I don't think the regex engine stops matching on new lines, but I could be wrong.