Skip to main content
Provide at least one predicate and at most 250. Regular expressions are limited to 2048 bytes and do not support backreferences.

Arguments

string
required
The array key.
number | string
required
The first index to search. Use "-" for the lowest possible index.
number | string
required
The last index to search. Use "+" for the highest possible index.
Object
required
ArGrepPredicate[]
required
One to 250 predicates. Each is { exact: string }, { match: string }, { glob: string }, or { re: string } for equality, substring, glob, or regular-expression matching.
'AND' | 'OR' | 'and' | 'or'
How to combine predicates. Defaults to OR.
boolean
Match case-insensitively. Defaults to false.
boolean
Return index-value pairs instead of indexes. Defaults to false.
number
Maximum number of matches. If provided, it must be greater than zero.

Response

Matching indexes, or index-value pairs when values are requested. TypeScript returns indexes as strings; Python returns integers. No matches returns an empty list.
Values use the SDK’s automatic deserialization. Use TData to describe stored JSON values; it defaults to string.
See the server command reference for protocol details.