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 : /url/app/app/mapp
Regular expression: (/app)*
Matches: /app/app
Text :
/url?paramA=valueA¶mB=v
alueB
Regular expression:
(param)A=(value)A&\0B\1B
Matches:
paramA=valueA¶mB=value
B
|Matches either the character/capture group
before or after the pipe ( | ).
Text : Host: www.example.com
Regular expression: (\r\n)|\n|\r
Matches: The line ending,
regardless of pl atform.
^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 when 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
Regular 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
Regular expression: [^u]
Matches: /rl?parameter=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
that 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
Regular expression: [012]
Matches: 1
Would also match 0 or 2.
Text : /url?parameter=valueB
Regular 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