Sorted Sets Zremrangebylex
# Redis Zremrangebylex Command
* (javascript:void(0);)
* (javascript:void(0);)
* (javascript:void(0);)
* (javascript:void(0))
Redis Tutorial
(#)(#)(#)(#)(#)
## Redis Commands
(#)(#)(#)(#)(#)(#)(#)(#)[Redis Pub/Sub](#)(#)(#)(#)(#)(#)(#)
## Redis Advanced Tutorial
(#)(#)(#)(#)(#)(#)(#)(#)
[](#)(#)
(#)[](#)
# Redis Zremrangebylex Command
!(#)(#)
The Redis Zremrangebylex command removes all members in a sorted set within the given lexicographical range.
### Syntax
The basic syntax of the redis Zremrangebylex command is as follows:
redis 127.0.0.1:6379> ZREMRANGEBYLEX key min max
### Available Versions
>= 2.8.9
### Return Value
The number of members successfully removed, excluding ignored members.
### Example
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 -11) "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 -11) "ALPHA"2) "aaaa"3) "zap"4) "zip" redis>
!(#)(#)
YouTip