Cisco ASA Series Cli Configuration Manual page 550

Software version 9.0 for the services module
Hide thumbs Also See for ASA Series:
Table of Contents

Advertisement

Configuring Objects
Table 1-1
Characte
r
\
char
\r
\n
\t
\f
\xNN
\NNN
Detailed Steps
Step 1
To test a regular expression to make sure it matches what you think it will match, enter the following
command:
hostname(config)# test regex input_text regular_expression
Where the input_text argument is a string you want to match using the regular expression, up to 201
characters in length.
The regular_expression argument can be up to 100 characters in length.
Use Ctrl+V to escape all of the special characters in the CLI. For example, to enter a tab in the input
text in the test regex command, you must enter test regex "test[Ctrl+V Tab]" "test\t".
If the regular expression matches the input text, you see the following message:
INFO: Regular expression match succeeded.
If the regular expression does not match the input text, you see the following message:
INFO: Regular expression match failed.
Step 2
To add a regular expression after you tested it, enter the following command:
hostname(config)# regex name regular_expression
Where the name argument can be up to 40 characters in length.
The regular_expression argument can be up to 100 characters in length.
Examples
The following example creates two regular expressions for use in an inspection policy map:
Cisco ASA Series CLI Configuration Guide
1-16
regex Metacharacters (continued)
Description
Escape character
Character
Carriage return
Newline
Tab
Formfeed
Escaped hexadecimal number
Escaped octal number
Notes
When used with a metacharacter, matches a literal
character. For example, \[ matches the left square
bracket.
When character is not a metacharacter, matches the
literal character.
Matches a carriage return 0x0d.
Matches a new line 0x0a.
Matches a tab 0x09.
Matches a form feed 0x0c.
Matches an ASCII character using hexadecimal (exactly
two digits).
Matches an ASCII character as octal (exactly three
digits). For example, the character 040 represents a
space.
Chapter 1
Configuring Objects

Advertisement

Table of Contents
loading

Table of Contents