Cisco PIX 500 Series Configuration Manual page 396

Security appliance command line
Hide thumbs Also See for PIX 500 Series:
Table of Contents

Advertisement

Configuring Special Actions for Application Inspections
Table 21-1
Character Description
[a-c]
""
^
\
char
\r
\n
\t
\f
\xNN
\NNN
To test and create a regular expression, perform the following 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.
To add a regular expression after you tested it, enter the following command:
Step 2
Cisco Security Appliance Command Line Configuration Guide
21-8
regex Metacharacters (continued)
Character range class
Quotation marks
Caret
Escape character
Character
Carriage return
Newline
Tab
Formfeed
Escaped hexadecimal number
Escaped octal number
Chapter 21
Notes
Matches any character in the range. [a-z] matches any
lowercase letter. You can mix characters and ranges:
[abcq-z] matches a, b, c, q, r, s, t, u, v, w, x, y, z, and so
does [a-cq-z].
The dash (-) character is literal only if it is the last or the
first character within the brackets: [abc-] or [-abc].
Preserves trailing or leading spaces in the string. For
example, " test" preserves the leading space when it
looks for a match.
Specifies the beginning of a line.
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.
Using Modular Policy Framework
OL-12172-03

Advertisement

Table of Contents
loading

This manual is also suitable for:

Asa 5500 series

Table of Contents