How i can mention the VLAN range in REX ??? Below one is not working some one help me
^interface FastEthernet.*\n(.*\n)*.*switchport access vlan [128 -300].*\n(.*\n)*.*
That should do it: ^interface FastEthernet.+\nswitchport access vlan ((?![1][2][0-7])[1-2][2-9][0-9]|[2][0-9][0-9]|[3][0][0])
((?![1][2][0-7])
takes care of everything equal or below 127
[1-2][2-9][0-9]|
takes care of everything from 120 to 299 (120 to 127 is taken care of by the first negative lookahead)
|[2][0-9][0-9]|
takes care of everything from 201 to 299
|[3][0][0])
takes care of 300
Regards
Rene
While using Below REX it not checking 128 to 300 VLAN but checking all
In the below REX it not checking the correct interface (which i have verified manually and updated in NCM configs)
^interface FastEthernet.+\nswitchport access vlan ((?![1][2][0-7])[1-2][2-9][0-9]|[2][0-9][0-9]|[3][0][0])
Where am doing mistake ???
Sorry for the delay, the whitespaces in front of "Switchport" are the issue.
This should do it: ^interface FastEthernet.+\n(\s*)switchport access vlan ((?![1][2][0-7])[1-2][2-9][0-9]|[2][0-9][0-9]|[3][0][0])