Arguments
str
required
The array key.
int | Literal['-']
required
The first index to search. Use
"-" for the lowest possible index.int | Literal['+']
required
The last index to search. Use
"+" for the highest possible index.str | List[str]
Match the whole value.
str | List[str]
Match a substring.
str | List[str]
Match a glob pattern.
str | List[str]
Match a regular expression.
Literal['AND', 'OR']
How to combine predicates. Defaults to OR.
bool
Match case-insensitively. Defaults to False.
bool
Return index-value tuples instead of indexes. Defaults to False.
int
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.