<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PencilKit",
  "identifier" : "/documentation/PencilKit/PKStrokeRecognizer/search(_:fullWordsOnly:caseMatchingOnly:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "PencilKit"
    ],
    "preciseIdentifier" : "s:9PencilKit18PKStrokeRecognizerC6search_13fullWordsOnly012caseMatchingH0SayAC12SearchResultVGSS_S2btYaF"
  },
  "title" : "search(_:fullWordsOnly:caseMatchingOnly:)"
}
-->

# search(_:fullWordsOnly:caseMatchingOnly:)

Searches the drawing for strokes whose recognized text matches the query.

```
final func search(_ query: String, fullWordsOnly: Bool = false, caseMatchingOnly: Bool = false) async -> [PKStrokeRecognizer.SearchResult]
```

## Parameters

`query`

The query string to search for.

`fullWordsOnly`

Restricts matches to whole words only.

`caseMatchingOnly`

Restricts matches to exact case.

## Return Value

An array of all results found.

---

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)