Multiple attributes / extraction of a specific value with unlang regex ?
Phil Mayers
p.mayers at imperial.ac.uk
Mon Feb 17 13:04:00 CET 2014
On 17/02/14 09:55, Chaigneau, Nicolas wrote:
> This works, but is not good enough because <value> might contain a comma.
>
> Is there a better way to do this with unlang ?
As Arran has said, foreach:
foreach (Cisco-AVPair) {
if (Foreach-Variable-0 =~ /^circuit-id=(.+)/) {
update control {
My-Cisco-Circuit-Id := "%{1}"
}
}
}
At one point I submitted a patch to make the regexp operator logic loop
through all matching values, but I think this functionality went away
when unlang was rewritten.
More information about the Freeradius-Users
mailing list