---
title: "filter(matchingCategory:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/sequence/filter(matchingcategory:)"
---

# filter(matchingCategory:)

Filters a sequence of tags based on matching the specified category.  Returns the tags that match the specified category.

## Declaration

```swift
func filter<T>(matchingCategory category: CMTypedTag<T>.Category) -> [CMTypedTag<T>] where T : Sendable
```

## Discussion

Discussion category: The category to match.
