diff --git a/src/content/docs/ruleset-engine/rules-language/operators.mdx b/src/content/docs/ruleset-engine/rules-language/operators.mdx
index e093a8f89f7d75..a37c10e26f8c46 100644
--- a/src/content/docs/ruleset-engine/rules-language/operators.mdx
+++ b/src/content/docs/ruleset-engine/rules-language/operators.mdx
@@ -118,7 +118,7 @@ The Rules language supports these comparison operators:
- Exactly contains |
+ Contains |
contains |
|
✅ |
@@ -129,7 +129,29 @@ The Rules language supports these comparison operators:
- Matches regex* |
+ Wildcard1 (case-insensitive) |
+ wildcard |
+ |
+ ✅ |
+ ❌ |
+ ❌ |
+
+ http.request.uri.path wildcard "/articles/*"
+ |
+
+
+ Strict wildcard1 (case-sensitive) |
+ strict wildcard |
+ |
+ ✅ |
+ ❌ |
+ ❌ |
+
+ http.request.uri.path strict wildcard "/AdminTeam/*"
+ |
+
+
+ Matches regex2 |
matches |
~ |
✅ |
@@ -140,21 +162,25 @@ The Rules language supports these comparison operators:
- Value is in a set of values |
+ Is in set of values / list3 |
in |
|
✅ |
✅ |
✅ |
- ip.src in {"{ 203.0.113.0 203.0.113.1 }"}
+ ip.src in {"{ 203.0.113.0 203.0.113.1 }"}
+ ip.src.asnum in $<LIST>
|
-\* _Access to the `matches` operator requires a Cloudflare Business or Enterprise plan._
+{/* prettier-ignore */}
+1 For more information, refer to [Wildcard matching](#wildcard-matching).
+2 Access to the `matches` operator requires a Cloudflare Business or Enterprise plan. For more information, refer to [Regular expression matching](#regular-expression-matching).
+3 Currently, not all Cloudflare products support lists in their expressions. For more information on lists, refer to [Inline lists](/ruleset-engine/rules-language/values/#inline-lists) and [Lists](/waf/tools/lists/).
:::caution
Comparison operators entered using English notation (such as `eq`, `lt`, and `gt`) must be written in lowercase.
@@ -162,12 +188,19 @@ Comparison operators entered using English notation (such as `eq`, `lt`, and `gt
### Additional operators in the Cloudflare dashboard
-The Cloudflare dashboard shows the following functions as operators:
+The Cloudflare dashboard may show the following additional operators, depending on the exact field and the type of rule:
- _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.
+
- _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.
-However, when writing your own custom expressions, you must use these functions in function calls, not as operators. For example:
+- _is in list_ (corresponding to ` in $`): 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/).
+
+- _is not in list_ (corresponding to `not in $`): 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/).
+
+:::note
+
+When writing your own custom expressions, you must use the `starts_with()` and `ends_with()` functions in function calls, not as operators. For example:
```txt
# Valid function call
@@ -177,6 +210,8 @@ ends_with(http.request.uri.path, ".html")
http.request.uri.path ends_with ".html"
```
+:::
+
### Comparing string values
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,9 +220,7 @@ String comparison in rule expressions is case-sensitive. To account for possible
lower(http.request.uri.path) contains "/wp-login.php"
```
-:::caution
Wildcard matching is only supported with the `wildcard` and `strict wildcard` operators, and regular expression matching is only supported with the `matches` operator.
-:::
### Wildcard matching