You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\*_Access to the `matches` operator requires a Cloudflare Business or Enterprise plan._
180
+
{/* prettier-ignore */}
181
+
<sup>1</sup> For more information, refer to [Wildcard matching](#wildcard-matching).<br/>
182
+
<sup>2</sup> Access to the `matches` operator requires a Cloudflare Business or Enterprise plan. For more information, refer to [Regular expression matching](#regular-expression-matching).<br/>
183
+
<sup>3</sup> For more information, refer to [Inline lists](/ruleset-engine/rules-language/values/#inline-lists) and [Lists](/waf/tools/lists/).
158
184
159
185
:::caution
160
186
Comparison operators entered using English notation (such as `eq`, `lt`, and `gt`) must be written in lowercase.
161
187
:::
162
188
163
189
### Additional operators in the Cloudflare dashboard
164
190
165
-
The Cloudflare dashboard shows the following functions as operators:
191
+
The Cloudflare dashboard may show the following additional operators, depending on the exact field and the type of rule:
166
192
167
193
-_starts with_ (corresponding to the [`starts_with()`](/ruleset-engine/rules-language/functions/#starts_with) function): Returns `true` when a string starts with a given substring, and `false` otherwise.
194
+
168
195
-_ends with_ (corresponding to the [`ends_with()`](/ruleset-engine/rules-language/functions/#ends_with) function): Returns `true` when a string ends with a given substring, and `false` otherwise.
169
196
170
-
However, when writing your own custom expressions, you must use these functions in function calls, not as operators. For example:
197
+
-_is in list_ (corresponding to `<FIELD> in $<LIST_NAME>`): Returns `true` when the field value is present in the specified [list](/waf/tools/lists/), and `false` otherwise. For more information, refer to [Use lists in expressions](/waf/tools/lists/use-in-expressions/).
198
+
199
+
-_is not in list_ (corresponding to `not <FIELD> in $<LIST_NAME>`): Returns `true` when the field value is not present in the specified [list](/waf/tools/lists/), and `false` otherwise. For more information, refer to [Use lists in expressions](/waf/tools/lists/use-in-expressions/).
200
+
201
+
:::note
202
+
203
+
When writing your own custom expressions, you must use the `starts_with()` and `ends_with()` functions in function calls, not as operators. For example:
String comparison in rule expressions is case-sensitive. To account for possible variations of string capitalization in an expression, you can use the [`lower()`](/ruleset-engine/rules-language/functions/#lower) function and compare the result with a lowercased string, like in the following example:
@@ -185,14 +220,7 @@ String comparison in rule expressions is case-sensitive. To account for possible
Wildcard matching is only supported with the `wildcard` and `strict wildcard` operators, and regular expression matching is only supported with the `matches` operator.
190
-
:::
191
-
192
-
### Using Lists
193
-
194
-
When selecting `Hostname` or `AS Num` as *Field*, you use the additionals `is in list` / `is not in list` operators.
195
-
You first need to create a [List](/waf/tools/lists/custom-lists/).
0 commit comments