<div dir="ltr"><div><div><div><div><div><div>I'm trying to do a global split on a forward slash in FreeRadius 2.1.12.<br><br></div>Essentially I am trying to do a split on the ADSL Circuit ID:<br><br>ADSL-Agent-Circuit-Id = "POLT01 eth 1/1/02/05/4/14/1:10"<br>
<br></div>And trying to grab the value in the 6th split being "14" and check it's a 14.<br><br></div>I would have hoped something like this regex would work:<br><br> if ("%{ADSL-Agent-Circuit-Id}" =~ /(?<=\/)([\w-]*)(?=\/)/ ) {<br>
update request {<br> Tmp-String-1 = "%{0}"<br> Tmp-String-2 = "%{1}"<br> Tmp-String-3 = "%{2}"<br>
Tmp-String-4 = "%{3}"<br> Tmp-String-5 = "%{4}"<br> Tmp-String-6 = "%{5}"<br> Tmp-String-7 = "%{6}"<br>
}<br> }<br><br></div>And it would put each match into a Variable, or using /\//g too.<br><br></div>But neither option works.<br><br></div>Any suggestions on how to make it work, as I think taking it into Perl may be the best option.<br>
</div>