Fortinet 5.0 Patch 6 Microscope & Magnifier User Manual


 
Fortinet 674 FortiWeb 5.0 Patch 6 Administration Guide
Table 61:Popular FortiWeb regular expression syntax
Notation Function Sample Matches
Anything
excep
t
*.|^$?+\(){}[]
Literal match, except if the character is part of
a:
capture group
ba
ck-reference (e.g. $0 or \1)
other regular expression token (e.g. \w)
Text: My
cat catches things.
Regu
lar expression: cat
Matche
s: cat
Depe
nding on whether the
feature looks for all instances
, it
may also match “cat” in the
beginning of “catches”.
\ Escape character. If it is followed by:
An alphanumeric character, the
alpha
numeric character is not matched
literally as usual. Instead, it is interpreted as
a regular expression token. For example, \w
matches a word, as defined by the locale.
Any regular expression special character:
*.|^$?+\(){}[]\
this escapes interpretation as a regular
expression token, and instead treats it as a
normal letter. For example, \\ matches:
\
Text: /
url?parameter=value
Regu
lar expression: \?para
m
Matches: ?par
am
(?i) Turns on case-insensitive matching for
subse
quent evaluation, until it is turned off or
the evaluation completes.
Text: /url?Parameter=value
Regular expression: (?i)param
Matches: Param
Would also match pArAM etc.
\n Matches a new line (also called a line feed).
Microsoft Windows platforms typically use \r\n
a
t
the end of each line. Linux and Unix
platforms typically use \n. Mac OS X typically
uses \r
Text: My cat catches things.
Regu
lar expression: \n
Matches: The
end of the text on
Linux and other Unix-like
platforms, only part of the line
ending on Windows, and nothing
on Mac OS X.
\r Matches a carriage return. Text: My
cat catches things.
Regu
lar expression: \r
Matches: Part of
the line ending
on Windows, nothing on
Linux/Unix, and the whole line
ending on Mac OS X.