Fortinet 680 FortiWeb 5.0 Patch 6 Administration Guide
See also
•Cookbook regular expressions
•Regular expression syntax
Cookbook regular expressionsSome elements occur often in FortiWeb regular expressions, such as expressions to match
domain names, URLs, parameters, and HTML tags. You can use these as building blocks for
your own regular expressions.
For more expressions to match items such as SQL queries and URIs, see your FortiWeb’s list
of predefined data types.
To match... You can use...
Line endings
(platform-independent)
(\r\n)|\n|\r
Any alphanumeric character
(ASCII only; e.g. does not match é
or É)
[a-zA-Z0-9]
Specific domain name
(e.g. www.example.com; case
insensitive)
(?i)\bwww\.example\.com\b
Any domain name
(valid non-internationalized TLDs
only; does not match domain
names surrounded by letters or
numbers)
(?i)\b.*\.(a(c|d|e(ro)?|f|g|i|m|n|o|q|r|s(ia)?|t|y|w|x|z)|b(a|b|d|e|f|
g|h|i(z)?|j|m|n|o|r|s|t|v|w|y|z)|c(a(t)?|c|d|f|g|h|i|k|l|m|n|o((m)?(o
p)?)|r|s|u|v|x|y|z)|d(e|j|k|m|o|z)|e(c|du|e|g|h|r|s|t|u)|f(i|j|k|m|o|r)|
g(a|b|d|e|f|g|h|i|l|m|n|ov|p|q|r|s|t|u|w|y)|h(k|m|n|r|t|u)|i(d|e|l|m|n
(fo)?(t)?|o|q|r|s|t)|j(e|m|o(bs)?|p)|k(e|g|h|i|m|n|p|r|w|y|z)|l(a|b|c|i
|k|r|s|t|u|vy)|m(a|c|d|e|g|h|il|k|l|m|n|o(bi)?|p|q|r|s|t|u(seum)?|v|
w|x|y|z)|n(a(me)?|c|e(t)?|f|g|i|l|o|p|r|u|z)|o(m|rg)|p(a|e|f|g|h|k|l|
m|n|r(o)?|s|t|w|y)|qa|r(e|o|s|u|w)|s(a|b|c|d|e|g|h|i|j|k|l|m|n|o|r|s|t
|u|v|y|z)|t(c|d|el|f|g|h|j|k|l|m|n|o|p|r(avel)?|t|v|w|z)|u(a|g|k|s|y|z)|
v(a|c|e|g|i|n|u)|w(f|s)|xxx|y(e|t|u)|z(a|m|w))\b
Any domain name
(valid internationalized TLDs in
UTF-8 only; does not match
ASCII-encoded DNS forms such
as xn--fiqs8s)
(?i)\b.*\.(tél\b|中国 |中國 |日本 |新加 坡 |לארשי|台灣
|رئازجلا|বাংলা|رصم|გე|香港
|भारत|بترا|ార|ભારત|ਭਾਰਤ|இதியா|ভারত|ندرا|ناريا|қ
аз|نامع|برغملا|ايسيلم|рф|اپناتس|срб|رطق|نيطسلف|சி
க |ةيدوعسلا|한국
|ايروس|ලංකා|இலைக|ไทย|سنوت|укр|تاراما|台湾|ن��يلا)\b
Any sub-domain name (?i)\b(.*)\.example\.com\b
Specific IPv4 address \b10\.1\.1\.1\b