352
01-28006-0100-20041105
Fortinet Inc.
Using Perl regular expressions
Spam filter
Examples
To block any word in a phrase
/block|any|word/
To block purposely misspelled words
Spammers often insert other characters between the letters of a word to fool spam
blocking software.
/^.*v.*i.*a.*g.*r.*a.*$/i
/cr[eéèêë][\+\-\*=<>\.\,;!\?%&§@\^°\$£€\{\}()\[\]\|\\_01]dit/i
To block common spam phrases
The following phrases are some examples of common phrases found in spam
messages.
/try it for free/i
/student loans/i
/you’re already approved/i
/special[\+\-\*=<>\.\,;!\?%&~#§@\^°\$£€\{\}()\[\]\|\\_1]offer/i
abc\b
abc when followed by a word boundary (e.g. in abc! but not in abcd)
perl\B
perl when not followed by a word boundary (e.g. in perlert but not in perl stuff)
\x
tells the regular expression parser to ignore white space that is neither
backslashed nor within a character class. You can use this to break up your
regular expression into (slightly) more readable parts.
/x
used to add regexps within other text. If the first character in a pattern is
forward slash '/', the '/' is treated as the delimiter. The pattern must contain a
second '/'. The pattern between ‘/’ will be taken as a regexp, and anything
after the second ‘/’ will be parsed as a list of regexp options ('i', 'x', etc). An
error occurs If the second '/' is missing. In regular expressions, the leading
and trailing space is treated as part of the regular expression.
Table 35: Perl regular expression formats
Содержание FortiGate FortiGate-500A
Страница 24: ...24 01 28006 0100 20041105 Fortinet Inc Customer service and technical support Introduction...
Страница 46: ...46 01 28006 0100 20041105 Fortinet Inc Changing the FortiGate firmware System status...
Страница 72: ...72 01 28006 0100 20041105 Fortinet Inc FortiGate IPv6 support System network...
Страница 80: ...80 01 28006 0100 20041105 Fortinet Inc Dynamic IP System DHCP...
Страница 110: ...110 01 28006 0100 20041105 Fortinet Inc FortiManager System config...
Страница 116: ...116 01 28006 0100 20041105 Fortinet Inc Access profiles System administration...
Страница 134: ...134 01 28006 0100 20041105 Fortinet Inc Shutdown System maintenance...
Страница 248: ...248 01 28006 0100 20041105 Fortinet Inc CLI configuration Users and authentication...
Страница 324: ...324 01 28006 0100 20041105 Fortinet Inc CLI configuration Antivirus...
Страница 386: ...386 01 28006 0100 20041105 Fortinet Inc Glossary...
Страница 394: ...394 01 28006 0100 20041105 Fortinet Inc Index...