Using Regular Expressions - Cisco Catalyst 2960 series Configuration Manual

Consolidated platform configuration guide, ios release 15.2(4)e
Hide thumbs Also See for Catalyst 2960 series:
Table of Contents

Advertisement

How to Write EEM Policies Using the Cisco IOS CLI
Command or Action
Step 6
action label
Example:
Device(config-applet)# action 4.0 end

Using Regular Expressions

To match a regular expression pattern with an input string, perform this task. Using regular expressions, you
can specify the rules for a set of possible strings to be matched.
SUMMARY STEPS
1. enable
2. configure terminal
3. event manager applet applet-name
4. action label regexp string-pattern string-input [string-match [string-submatch1] [string-submatch2]
[string-submatch3]]
DETAILED STEPS
Command or Action
Step 1
enable
Example:
Device> enable
Step 2
configure terminal
Example:
configure terminal
Device#
Step 3
event manager applet applet-name
Example:
Device(config)#
regexp
Step 4
action label regexp string-pattern string-input
[string-match [string-submatch1] [string-submatch2]
[string-submatch3]]
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1738
end
event manager applet
Purpose
Exits from the running action.
Purpose
Enables privileged EXEC mode.
• Enter your password if prompted.
Enters global configuration mode.
Registers the applet with the Embedded Event Manager (EEM)
and enters applet configuration mode.
Specifies an expression pattern to match with an input string.
• In this example, an input string of 'red blue green' is
specified. When the expression pattern matches the input

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents