Redis Zremrangebylex 命令

Redis 教程 · 2019-03-07 22:42:13

Redis Zremrangebylex 命令用于移除有序集合中给定的字典区间的所有成员。

语法

redis Zremrangebylex命令基本语法如下:

redis 127.0.0.1:6379> ZREMRANGEBYLEX key min max

可用版本

>= 2.8.9

返回值

被成功移除的成员的数量,不包括被忽略的成员。

实例

redis 127.0.0.1:6379> ZADD myzset 0 aaaa 0 b 0 c 0 d 0 e
(integer) 5
redis 127.0.0.1:6379> ZADD myzset 0 foo 0 zap 0 zip 0 ALPHA 0 alpha
(integer) 5
redis 127.0.0.1:6379> ZRANGE myzset 0 -1
1) "ALPHA"
 2) "aaaa"
 3) "alpha"
 4) "b"
 5) "c"
 6) "d"
 7) "e"
 8) "foo"
 9) "zap"
10) "zip"
redis 127.0.0.1:6379> ZREMRANGEBYLEX myzset [alpha [omega
(integer) 6
redis 127.0.0.1:6379> ZRANGE myzset 0 -1
1) "ALPHA"
2) "aaaa"
3) "zap"
4) "zip"
redis> 

点击查看所有 Redis 教程 文章: https://codercto.com/courses/l/33.html

查看所有标签

Rationality for Mortals

Rationality for Mortals

Gerd Gigerenzer / Oxford University Press, USA / 2008-05-02 / USD 65.00

Gerd Gigerenzer's influential work examines the rationality of individuals not from the perspective of logic or probability, but from the point of view of adaptation to the real world of human behavio......一起来看看 《Rationality for Mortals》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具