Cisco Cisco Web Security Appliance S390 Betriebsanweisung

Seite von 582
R E G U L A R   E X P R E S S I O N   C H A R A C T E R   T A B L E
C H A P T E R   1 3 :   U R L   F I L T E R S
 291
/downloads/.*\.(exe|zip|bin)
Avoid using regular expressions strings that are redundant because they can cause higher 
CPU usage on the Web Security appliance. A redundant regular expression is one that starts 
or ends with “.*”. 
Note — You must enclose regular expressions that contain blank spaces or non-alphanumeric 
characters in ASCII quotation marks.
Regular Expression Character Table
Table 13-5 describes characters that are commonly used to form regular expressions: 
Table 13-5 Regular Expression Character Descriptions
Character
Description
.
Matches a single character.
*
Matches zero or more occurrences of the preceding regular expression. 
For example:
[0-9]* matches any number of digits
“.*” matches any arbitrary string of characters
^
Matches the beginning of a line as the first character of a regular expression.
$
Matches the end of a line as the last character of a regular expression.
+
Matches one or more occurrences of the preceding regular expression.
?
Matches zero or one occurrence of the preceding regular expression.
|
Matches the preceding regular expression or the following regular expression. 
For example:
x|y matches either x or y
abc|xyz matches either of the strings abc or xyz
[ ]
Matches the characters or digits that are enclosed within the brackets. 
For example:
[a-z] matches any character between a and z
[r-u] matches any of the characters r, s, t, or u
[0-3] matches any of the single digits 0, 1, 2, 3
{ }
Specifies the number of times to match the previous pattern. 
For example:
D{1,3} matches one to three occurrences of the letter D