best way to split by "," and interate?
Arran Cudbard-Bell
a.cudbardb at freeradius.org
Wed Sep 16 18:58:04 CEST 2015
> On 16 Sep 2015, at 17:54, Arran Cudbard-Bell <a.cudbardb at freeradius.org> wrote:
>
>
>> On 16 Sep 2015, at 17:39, Jorge Pereira <jpereiran at gmail.com> wrote:
>>
>> Hi,
>>
>> I have a list
>>
>> update control {
>> &Tmp-String-0 = "aa:bb:cc:dd:ee:ff,00:11:22:33:44:55,ff:ee:dd:cc:bb:aa"
>> }
>>
>> And I would like to know about the best approach to split by "," and check
>> if match with my ${Called-Station-Id}
>> someone have a idea?
>
> "%{explode:&Called-Station-ID ,}"
>
> foreach &Called-Station-ID {
> if ("%{Foreach-Variable-0}" =~ /expr/) {
> <stuff>
> }
> }
>
Ah, misread, but you get the idea...
Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150916/35a45e99/attachment.sig>
More information about the Freeradius-Users
mailing list