# Sequence.filter(_:)

- **Module:** Sequence
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/254f8b2be7eb60cacc3ffcb3ea8e456784f582df/Sources/LibTmux/FilterExpr.swift#L326
- **Page:** https://libtmux.org/en/swift/latest/reference/sequence-filter(_-)/

```
Sequence.filter(_:)(expression: FilterExpr<Element>) -> [Self.Element]
```

Every element the filter matches, in order.

Returns a plain array: ordered, replayable, and free of any live
connection to tmux.

## Raises

- `RegexMatchError`
