zrm
ZRM
Apply for Redis Developer Course
|
Redis Regular Inspection / Technical Support
|
Redis Enterprise Server
|
|---|
Delete values by pattern
Usage: zrm key val*.
You can use a glob-style pattern for the value.
- * : Matches any characters: h*llo -> hllo, heeeello, etc
- ? : Matches one character: h?llo -> hallo, hello, hxllo, etc
- [alphabet] : Matches a character inside the brackets: h[ae]llo -> hallo, hello
- [^e] : Matches any character except those in the brackets:
h[^e]llo -> hallo, hbllo,... but hello is excluded.
- [a-c] : Matches a character range inside the brackets: h[a-c]llo -> hallo, hbllo, hcllo
- \ : To use the special characters (*?[^]) literally, prefix them with \.
Example
| Command> | zadd key 11 value11 12 value12 21 value21 22 value22 |
| Result> | 4 |
| Command> | zrm key value1* |
| Result> | 2 |
| Command> | zls key * |
| Result> |
1) value21 2) value22 |
Syntax
ZRM key pattern
- Available since Enterprise version 6.1.0.
- Time complexity is O(N). N is the number of items.
| << ZREM | ZRM | ZREMRANGEBYRANK >> |
|---|
Email
답글이 올라오면 이메일로 알려드리겠습니다.
