String Validation
Michael Bryant
michael.bryant at sjc.ox.ac.uk
Sun Aug 16 11:58:11 CEST 2009
>
> If a connection that comes in with a GROUP NAME from SQL of "USUK-XX"
> or "WUK-XX" and I want to strip of the "-XX", how would I do this with
> ulang so I only validate the following?
Using the regexp feature, you can match part of an attribute then
reference it later, like so:
if (SQL-GROUP =~ /(.*)-XX/) {
update request {
SQL-GROUP := "%{1}"
}
}
--Mike
More information about the Freeradius-Users
mailing list