Substrings with unlang

Vegard Svanberg vegard at svanberg.no
Thu Sep 22 09:00:58 CEST 2016


* Mikhail Sutormin <msutormin at gmail.com> [2016-09-22 01:47]:

>         if (Stripped-User-Name =~ /(.{0,19})$/) {

You're anchoring it to the end of the line with $. Try ^(.{0,19})
instead and it should work (hopefully - didn't test).

-- 
Vegard Svanberg <vegard at svanberg.no> [*Takapa at IRC (EFnet)]



More information about the Freeradius-Users mailing list