Cisco Systems ASA 5510 Network Router User Manual


  Open as PDF
of 2086
 
20-12
Cisco ASA 5500 Series Configuration Guide using ASDM
Chapter 20 Configuring Objects
Configuring Regular Expressions
Detailed Steps
Configuration > Global Objects > Regular Expressions > Add/Edit a Regular Expression Fields:
Name—Enter the name of the regular expression, up to 40 characters in length.
Value—Enter the regular expression, up to 100 characters in length. You can enter the text manually,
using the metacharacters in Table 20-1, or you can click Build to use the Building a Regular
Expression dialog box.
Build—Helps you build a regular expression using the Building a Regular Expression dialog box.
Test—Tests a regular expression against some sample text.
Building a Regular Expression
The Configuration > Global Objects > Regular Expressions > Add/Edit a Regular Expression > Build
Regular Expression dialog box lets you construct a regular expression out of characters and
metacharacters. Fields that insert metacharacters include the metacharacter in parentheses in the field
name.
See Table 20-1 on page 20-11 for more information about metacharacters.
[a-c] Character range class 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].
“” Quotation marks Preserves trailing or leading spaces in the string. For
example, “test preserves the leading space when it
looks for a match.
^ Caret Specifies the beginning of a line.
\ Escape character When used with a metacharacter, matches a literal
character. For example, \[ matches the left square
bracket.
char Character When character is not a metacharacter, matches the
literal character.
\r Carriage return Matches a carriage return 0x0d.
\n Newline Matches a new line 0x0a.
\t Tab Matches a tab 0x09.
\f Formfeed Matches a form feed 0x0c.
\xNN Escaped hexadecimal number Matches an ASCII character using hexadecimal (exactly
two digits).
\NNN Escaped octal number Matches an ASCII character as octal (exactly three
digits). For example, the character 040 represents a
space.
Table 20-1 regex Metacharacters (continued)
Character Description Notes