23 Feb
2018
23 Feb
'18
8:19 a.m.
On Fri, 2018-02-23 at 11:56 +0000, Kylián Martin wrote:
Here is the unlang snippet
device_regex = '^(http-tlv=){1}([\\][0-9]{1,3}){1,5}(.*)$'
regex_device_type { if (&Cisco-AVPair) { foreach &Cisco-AVPair { if ("%{string:%{Foreach-Variable-0}}" =~ /{policy.device_regex}/i) {
You're matching the text '{policy.device_regex}', not the defined string. Use ${policy.device_regex} if ("%{string:%{Foreach-Variable-0}}" =~ /${policy.device_regex}/i) { -- Matthew