# Libtmux.Query.matching

- **Module:** Libtmux
- **Package:** libtmux
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/lib/libtmux.mli#L695
- **Public owner:** Libtmux
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux-query-matching/

```
val matching : 'a Expr.t -> 'a Seq.t -> 'a Seq.t
```

`matching expression` compiles once when the adapter is constructed. Filtering preserves order and duplicates. Snapshot-derived sequences replay captured values; arbitrary input sequences retain their effects, exceptions and replay semantics. No tmux acquisition occurs.

## Parameters

- `arg1` (`'a Expr.t`)
- `arg2` (`'a Seq.t`)

## Guides

Pages that discuss `matching`.

- [Query captured data](/en/ocaml/latest/guides/queries/)
