# libtmux.query:matching

- **Package:** libtmux/query
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/query.lisp#L806
- **Public owner:** libtmux.query
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-query-matching/

```
(matching filter values &key (max-items +default-max-selection-items+) max-execution-visits)
```

Return a fresh simple vector of VALUES accepted by FILTER.
VALUES must be a finite list or non-string vector. The result preserves order,
multiplicity and the original captured handles. MAX-ITEMS bounds validation.
One execution budget is shared across the entire traversal; no I/O occurs.

## Parameters

- `filter`
- `values`
- `max-items?`
- `max-execution-visits?`

## Guides

Pages that discuss `matching`.

- [Getting started](/en/lisp/latest/guides/getting-started/)
- [Native queries](/en/lisp/latest/guides/queries/)
- [REPL tutorial](/en/lisp/latest/guides/tutorial/)
