---
title: "matches(_:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebextension/matchpattern/matches(_:)-471rf"
---

# matches(_:)

Matches the receiver pattern against the specified URL.

## Declaration

```swift
func matches(_ url: URL?) -> Bool
```

## Parameters

- `url`: The URL to match against the receiver pattern.

## Return Value

Return Value A Boolean value indicating if the pattern matches the specified URL.

## See Also

### Related Documentation

- [matches(_:options:)](webkit/wkwebextension/matchpattern/matches(_:options:)-5wo3g.md)
