<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKWebExtension/MatchPattern/matches(_:options:)-fnde",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKWebExtensionMatchPattern(im)matchesPattern:options:"
  },
  "title" : "matches(_:options:)"
}
-->

# matches(_:options:)

Matches the receiver pattern against the specified pattern with options.

```
func matches(_ pattern: WKWebExtension.MatchPattern?, options: WKWebExtension.MatchPattern.Options = []) -> Bool
```

## Parameters

`pattern`

The pattern to match against the receiver pattern.

`options`

The options to use while matching.

## Return Value

A Boolean value indicating if the receiver pattern matches the specified pattern.

## See Also

[`matches(_:)`](/documentation/WebKit/WKWebExtension/MatchPattern/matches(_:)-4d84f)

Matches the receiver pattern against the specified pattern.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)