ā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.
