Match newline in Cisco-AVPair[*]

Kostas Zorbadelos kzorba at
Wed Apr 15 15:29:13 CEST 2015

Hello all,

I am trying to perform a match against the full Cisco-AVPair string
(Cisco-AVPair[*]) to get a specific part. The exact check I am
performing is

if ("%{Cisco-AVPair[*]}" =~ /client-mac-address=(.*)/) {
               update control {
                       My-Client-Mac-Address = "%{1}"

The problem is that the regex I am using matches all newlines, so I get
all Cisco-AVpair[X] after my match.
The regex /client-mac-address=(.*)$/ does not seem to work. Is there any
way to match the newline and get only the mac-address I am interested

Sorry if this was replied in the past, the few tricks I tried did not
work and being lazy, I posted in the list for a quick reply.

Any suggestions welcome.



Kostas Zorbadelos		

More information about the Freeradius-Users mailing list