---
title: "replaceAllOccurrencesOfQueryString:usingOptions:withText:"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uitextsearching-53wjq/replacealloccurrencesofquerystring:usingoptions:withtext:"
---

# replaceAllOccurrencesOfQueryString:usingOptions:withText:

Informs the searchable object to replace all matching text across all searchable documents.

## Declaration

```occ
- (void) replaceAllOccurrencesOfQueryString:(NSString *) queryString usingOptions:(UITextSearchOptions *) options withText:(NSString *) replacementText;
```

## Parameters

- `queryString`: The string to search for and replace.
- `options`: The configurable options to use for matching words and comparing strings.
- `replacementText`: The string to replace the text with.

## Discussion

Discussion When supportsTextReplacement returns YES, the system calls this method during a find session to request the replacement of all text matching the query string.

## See Also

### Handling replacements

- [supportsTextReplacement](uikit/uitextsearching-53wjq/supportstextreplacement.md)
- [replaceFoundTextInRange:inDocument:withText:](uikit/uitextsearching-53wjq/replacefoundtextinrange:indocument:withtext:.md)
- [shouldReplaceFoundTextInRange:inDocument:withText:](uikit/uitextsearching-53wjq/shouldreplacefoundtextinrange:indocument:withtext:.md)
