KEYS
Syntax
Section titled “Syntax”KEYS pattern
KEYS returns all keys matching the pattern.
The pattern can contain the following special characters to match multiple keys. Supports glob-style patterns:
- *: matches any sequence of characters
- ?: matches any single character
Examples
Section titled “Examples”localhost:7379> SET k1 v1OKlocalhost:7379> SET k2 v2OKlocalhost:7379> SET k33 v33OKlocalhost:7379> KEYS k?OK0) k11) k2localhost:7379> KEYS k*OK0) k11) k22) k33localhost:7379> KEYS *OK0) k11) k22) k33