ZRANGEBYLEX
Returns sorted-set members within a lexicographical range.
Sorted sets · Example verified
Syntax covered here
ZRANGEBYLEX key min maxEqual-score members are queried with - and + to cover the full range in ascending lexicographical order.
Tested example & replies
Requests below run in order against an empty database. Each connection authenticates with the fixture password first. Quoted values are strings; null is a nil reply; arrays preserve RESP order.
# connection: default
> ZADD scores 1 a 1 b
2
# connection: default
> ZRANGEBYLEX scores - +
["a","b"]