ZREMRANGEBYSCORE

Since 1.1.0Sorted sets

Syntax

ZREMRANGEBYSCORE key min max
  • Flags: write
  • ACL categories: @slow, @sortedset, @write
  • Arity: 4

Removes the members of the sorted set at key with scores from min to max. ( excludes a bound; -inf and +inf are open ends.

Reply

  • The number of members removed.

Examples

> ZADD rm 3 c 4 d 5 e
(integer) 3
> ZREMRANGEBYSCORE rm (3 4
(integer) 1