freeGuard 100 CLI User Manual
21
To match a special character such as '.' and ‘*’, regular expressions use the ‘\’ escape character. For
example:
•
To match freedom9.com, the regular expression should be freedom9\.com.
In Perl regular expressions, ‘*’ means match 0 or more times of the character before it, not 0 or more
times of any character. For example:
•
freed*\.com matches freedddd.com but does not match freedom9.com.
To match any character 0 or more times, use ‘.*’ where ‘.’ means any character and the ‘*’ means 0 or
more times. For example:
•
the wildcard match pattern freed*.com is equivalent to the regular expression freed.*\.com.
Word boundary
In Perl regular expressions, the pattern does not have an implicit word boundary. For example, the
regular expression “test” not only matches the word “test” but also matches any word that contains the
word “test” such as “atest”, “mytest”, “testimony”, “atestb”. The notation “\b” specifies the word
boundary. To match exactly the word “test”, the expression should be
\btest\b
.
Case sensitivity
Regular expression pattern matching is case sensitive in the Web and Spam filters. To make a word or
phrase case insensitive, use the regular expression
/i
. For example,
/bad language/i
will block
all instances of “bad language” regardless of case.
Table 3: Perl regular expression examples
Expression Matches
abc
abc (that exact character sequence, but anywhere in the string)
^abc
abc at the beginning of the string
abc$
abc at the end of the string
a|b
either of a and b
^abc|abc$
the string abc at the beginning or at the end of the string
ab{2,4}c
an a followed by two, three or four b's followed by a c
ab{2,}c
an a followed by at least two b's followed by a c
ab*c
an a followed by any number (zero or more) of b's followed by a c
ab+c
an a followed by one or more b's followed by a c
ab?c
an a followed by an optional b followed by a c; that is, either abc or ac
a.c
an a followed by any single character (not newline) followed by a c
a\.c
a.c exactly
[abc]
any one of a, b and c
[Aa]bc
either of Abc and abc
[abc]+
any (nonempty) string of a's, b's and c's (such as a, abba, acbabcacaa)
[^abc]+
any (nonempty) string which does not contain any of a, b and c (such as defg)
Summary of Contents for freeGuard 100
Page 1: ...freeGuard 100 UTM Firewall CLI USER S MANUAL P N F0025000 Rev 1 1...
Page 3: ......
Page 7: ......
Page 87: ...80 The config ips anomaly command has 1 subcommand config limit...
Page 183: ...176...