Fortinet 675 FortiWeb 5.0 Patch 6 Administration Guide
\s Matches a space, non-breaking space, tab, line
ending, or other white space character.
Tip: Many languages do not separate words
with white space. Even in languages that
usually use a white space separator, words can
be separated with many other characters such
as:
\/-”’"“‘.,><—:;
and new lines.
In these cases, you should usually include
those in addition to \s in a match set ( [] ) or
may need to use \b (word boundary) instead.
Text : <a
href=‘http://www.example.com’
>
Regular expression:
www\.example\.com\s
Matches: Nothing.
Due to the final ’ which is a word
boundary but not a white space,
this does not match. The regular
expression should be:
www.example.com\b
\S Matches a character that is not white space,
such as A or 9.
Text : My cat catches things.
Regular expression: \S
Matches: Mycatcatchesthings.
\d Matches a decimal digit such as 9. Text : /url?parameterA=value1
Regular expression: \d
Matches: 1
\D Matches a character that is not a digit, such as
A or b or É.
\w Matches a whole word.
Words are substrings of any uninterrupted
combination of one or more characters from
this set:
[a-zA-Z0-9_]
between two word boundaries (space, new line,
:, etc.).
It does not match Unicode characters that are
equivalent, such as , ?? or .
Text : Yah oo!
Regular expression: \w
Matches: Yaho o
Does not match the terminal
exclamation point, which is a
word boundary.
\W Matches anything that is not a word. Text : Sell?!?~
Regular expression: \W
Matches: ?!?~
.Matches any single character except \r or \n.
Note: If the character is written by combining
two Unicode code points, such as à where the
core letter is encoded separately from the
accent mark, this will not match the entire
character: it will only match one of the code
points.
Text : My cat catches things.
Regular expression: c.t
Matches: cat cat
Table 61:Popular FortiWeb regular expression syntax
Notation Function Sample Matches