Configuring Flexible Command Line Interface
This individual regular expression gets combined to all the three expressions -
snmp-server vrf vrf10
apply-group FB_flexi_snmp
snmp-server vrf vrf1
!
snmp-server vrf vrf10
!
snmp-server vrf vrf100
!
In a configuration group, there can be instances of regular expressions overlap. In such cases, the regular
expression with the highest priority is activated and inherited, when applied. It has that regular expression,
which comes first in the lexicographic order that has the highest priority.
The following example shows how to use overlapping regular expressions and how the expression with higher
priority is applied:
group FB_flexi_snmp
snmp-server vrf '.*'
host 1.1.1.1 traps version 2c group_1
host 1.1.1.1 informs version 2c group_1
context group_1
!
snmp-server vrf '[\w]+'
host 2.2.2.2 traps version 2c group_2
host 2.2.2.2 informs version 2c group_2
context group_2
!
end-group
The expression shown below has the highest priority:
group FB_flexi_snmp
snmp-server vrf '.*'
host 1.1.1.1 traps version 2c group_1
host 1.1.1.1 informs version 2c group_1
context group_1
The examples given above, show two different regular expression
vrf '[\w]+'
The expression below, shows how these two expressions get merged together:
apply-group FB_flexi_snmp
snmp-server vrf vrf1
!
snmp-server vrf vrf10
!
and
snmp-server vrf vrf100
.
System Management Configuration Guide for Cisco NCS 5000 Series Routers, IOS XR Release 6.2.x
Regular Expressions in Configuration Groups
snmp-server vrf vrf1
as given below.
snmp-server vrf '.*'
,
and
snmp-server
87