例如
keys X 'or' Y
应该打印
1)X
2)Y
最佳答案
Redis 做 OR 只是作为一个位操作。
例如:
redis> SET key1 "foobar"
OK
redis> SET key2 "abcdef"
OK
redis> BITOP AND dest key1 key2
(integer) 6
redis> GET dest
"`bc`ab"
您可以在 http://redis.io/commands/bitop 上了解更多信息
关于regex - 如何在redis keys命令中应用 'OR'条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36863037/