Skip to main content

ZREMRANGEBYLEX

Note

Official reference: ZREMRANGEBYLEX.

Remove members in a lexicographical range.

Syntax

ZREMRANGEBYLEX key min max

Members must have equal scores. [value is inclusive and (value exclusive; - and + mean unbounded lower and upper limits.

Results

ReturnRowsContent
Update count--Number of members removed from the sorted set, not including non-existing members.

Example

ZADD demo:letters 0 alice 0 bob
ZREMRANGEBYLEX demo:letters [a [b