This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

RegEx Help

We are in the process of dropping in quite a bit of configuration related to ISE and Dot1x.  I have a Dot1x rule created where I have defined several lines of interface code where all of them must be found.  If one of the lines of code is not found all would be applied in the remediation script.

pastedImage_0.png

The problem lies in the Regular Expression needed for the config block start.  I do not want this configuration applied to the following

     - The first port of any switch (reserved for internal purposes).  As an example I do not want this applied to 1/0/1, 2/0/1, 3/0/1, 4/0/1 ect..

     - Config cannot be applied to a routed switchport or a trunk port.

Just getting started this is what I have come up with so far

^interface (GigabitEthernet|FastEthernet|TenGigabitEthernet|Ethernet)[0-4]\/[0-9]\/[0-9]

pastedImage_3.png