<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIFindSession/replaceAll(searchQuery:replacementString:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIFindSession(im)replaceAllInstancesOfSearchQuery:withReplacementString:options:"
  },
  "title" : "replaceAll(searchQuery:replacementString:options:)"
}
-->

# replaceAll(searchQuery:replacementString:options:)

Replaces all matching instances of the query string with the replacement string you provide.

```
func replaceAll(searchQuery: String, replacementString: String, options: UITextSearchOptions?)
```

## Parameters

`searchQuery`

The string to search for and replace, the user provides through the search text field of the system find panel.

`replacementString`

The replacement string, the user provides through the replace text field of the system find panel.

`options`

The object containing all the configurable options for the search.

---

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)