Cisco Cisco Web Security Appliance S670 사용자 가이드

다운로드
페이지 466
 
9-22
AsyncOS 8.8 for Cisco Web Security Appliances User Guide
 
Chapter 9      Classify URLs for Policy Application
  Regular Expressions
Regular Expression Character Table
Meta-
character
Description
.
Matches any single character, except the newline character (0x0A). For example, the 
regular expression 
r.t
 matches the strings rat, rut, r t, but not root.
Be wary of using unescaped dots in long patterns, and especially in the middle of longer 
patterns. See 
for more information.
*
Matches zero or more occurrences of the character immediately preceding. For example, 
the regular expression 
.*
 means match any string of characters, and 
[0-9]*
 matches any 
string of digits.
Be wary of using this meta-character, especially in conjunction with the dot character. Any 
pattern containing an unescaped dot that returns more than 63 characters after the dot will be 
disabled. Se
for more information.
\
The escape character; it means treat the following meta-character as an ordinary character. 
For example, 
\^
 is used to match the caret character (^) rather than the beginning of a line. 
Similarly, the expression 
\.
 is used to match an actual dot rather than any single character. 
^
Matches the beginning of a line. For example, the regular expression 
^When in matches
 
the beginning of the string “When in the course of human events” but not the string “What 
and when in the”.
$
Matches the end of a line or string. For example, 
b$\.
 matches any line or string that ends 
with “b.”
+
Matches one or more occurrences of the character or regular expression immediately 
preceding. For example, the regular expression 
9+
 matches 9, 99, and 999.
?
Matches zero or one occurrence of the preceding pattern element. For example,
 colou?r
 
matches both “colour” and “color” since the “u” is optional.
( )
Treat the expression between the left and right parens as a group, limiting the scope of 
other meta-characters. For example, 
(abc)+
 matches one or more occurrences of the string 
“abc”; such as, “abcabcabc” or “abc123” but not “abab” or “ab123”.
|
Logical OR: matches the preceding pattern or the following pattern. For example 
(him|her)
 matches the line “it belongs to him” and the line “it belongs to her” but does 
not match the line “it belongs to them.”
[ ]
Matches any one of the characters between the brackets. For example, the regular 
expression 
r[aou]t
 matches “rat”, “rot”, and “rut”, but not “ret”.
Ranges of characters are specified by a beginning character, a hyphen, and an ending 
character. For example, the pattern 
[0-9]
 means match any digit. Multiple ranges can be 
specified as well. The pattern 
[A-Za-z]
 means match any upper- or lower-case letter. To 
match any character except those in the range (that is, the complementary range), use a 
caret as the first character after the opening bracket. For example, the expression 
[^269A-Z]
 matches any characters except 2, 6, 9, and uppercase letters.