11-10-2020 11:24 PM
Hello,
for the comliance engine I have to find all interfaces not have a certain command line.
Here is a positive an a negativ example:
interface GigabitEthernet1/0/48
description Test1
switchport access vlan 830
switchport mode access
switchport voice vlan 310
no cdp enable
!
interface GigabitEthernet1/0/49
description Test2
switchport mode trunk
switchport nonegotiate
queue-set 2
mls qos trust dscp
channel-group 1 mode active
ip dhcp snooping trust
!
I am looking for an regex matching the hole interface 1/0/48 and NOT the interface 1/0/49.
The criterion should be, that all interfaces are found in which “mls qos trust dscp” is NOT present.
I tried “interface GigabitEthernet\d{1,2}\/\d{1,2}\/\d{1,2}[\s\n\w-].*?(?:(?<!mls qos trust dscp)[\s\n\w-])*?!” but this regex match all interfaces and not only the 1/0/48. But this is not working.
Any ideas?
Solved! Go to Solution.
11-24-2020 02:01 PM
Hello Mig,
your assumption was right, the compliance check does not support multiline regex, this is function as designed. This was the offical answer from GTAC.
11-24-2020 02:13 PM
Hello Mig,
I am in discussion with the sales team regarding an FR, yes.
11-24-2020 02:04 PM
Hi Stephan,
A new feature request ?
Mig
11-24-2020 02:01 PM
Hello Mig,
your assumption was right, the compliance check does not support multiline regex, this is function as designed. This was the offical answer from GTAC.
11-11-2020 11:56 AM
Hello Mig,
thank you for the hint. I will check this with the GTAC and I will update the topic here.