Fortinet 5.0 Patch 6 Microscope & Magnifier User Manual


 
Fortinet 677 FortiWeb 5.0 Patch 6 Administration Guide
() Creates a capture group or sub-pattern for
back-reference or to denote order of
operations. See also “Example: Inserting &
deleting body text” on page 382 and “What are
back-references?” on page 678.
Text: /u
rl/app/app/mapp
Regular expression: (/app)*
Matches: /app/app
Te
xt:
/url?p
aramA=valueA&paramB=v
alueB
Regular expression:
(param)A=(va
lue)A&\0B\1B
Matches:
paramA=valueA&paramB=value
B
| Matches either the ch
aracter/capture group
before or after the pipe ( | ).
Text: Host: www.example.com
Regular expression: (\r\n)
|\n|\r
Matches: The
line ending,
regardless of platform.
^ Matches either:
•the position of the beginning of a line (or
, in
multiline mode, the first line), not the first
character itself
the inverse of a character, but only if ^ is the
first character in a character class, such as
[^A]
This is useful if you want to match a word, but
only wh
en it occurs at the start of the line, or
when you want to match anything that is not a
specific character.
Text: /url?parameter=value
Regu
lar expression: ^/url
Matches: /url, but
only if it is at
the beginning of the path string.
It will not match “/url” in
subdirectories.
Text: /
url?parameter=value
Regu
lar expression: [^u]
Matches: /rl?par
ameter=vale
$ Matches the position
of the end of a line (or, in
multiline mode, the entire string), not the last
character itself.
[] Defines a set of characters or capture groups
th
at
are acceptable matches.
To define a set via a whole range instead of
listing every
possible match, separate the first
and last character in the range with a hyphen.
Note: Character ranges are matched according
to
their numerical code point in the encoding.
For example, [@-B] matches any UTF-8 code
points from 40 to 42 inclusive:
@AB
Text: /
url?parameter=value1
Regu
lar expression: [012]
Matche
s: 1
Would also match 0 or 2.
Text: /url?parameter=valueB
Regu
lar expression: [A-C]
Matches: B
Would also match “A” or “C”. It
would not match “b”.
Table 61:Popular FortiWeb regular expression syntax
Notation Function Sample Matches