> For the complete documentation index, see [llms.txt](https://docs.abtasty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abtasty.com/web-experimentation-and-personalization/editors-and-widget/list-of-widgets/ab-tasty-prebuilt-widgets/search--replace-widget.md).

# Search & Replace Widget

The Search & Replace widget is part of the **Special** widget category. For more information on the widgets, please refer to [Widgets configuration in the visual editor](https://docs.abtasty.com/web-experimentation-and-personalization/editors-and-widget/list-of-widgets/widgets-configuration-in-the-visual-editor.md).

## Introduction <a href="#id-01gndd6kdsf4mg5ttbx5q24nwc" id="id-01gndd6kdsf4mg5ttbx5q24nwc"></a>

The Search & Replace widget will help you replace all the occurrences of a word or a group of words on a page.

This is useful, for instance, for A/B testing a change in wording or microcopy, or simply to replace an old product name with a new one, or even the name of the former CEO with the new one.

The impact of this widget on your text is visible in the editor directly.

## Configuration <a href="#h_01j5zb75yy62b1affan8pk8285" id="h_01j5zb75yy62b1affan8pk8285"></a>

<img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fgit-blob-42ec1720aee8c65a0ae286190e8e33cd3c59fadf%2F3252a4e0b9414bdf8ac2698f7759c298.png?alt=media" alt="" width="298">

To configure the widget:

1. Type the word(s) you want to replace in the "Search" input.
2. Type the word(s) you want them to be replaced within the "Replace With" input.
3. Scope it or leave it. Leave “body” if you want to apply the changes to the whole page or select the element you want your replacement to be scoped to.
4. Save

Be careful, this widget is case-sensitive, so if the words you want to replace are "Product X", it will not replace:

* product X
* Product x
* product x

You will need to add four widgets to cover all cases.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.abtasty.com/web-experimentation-and-personalization/editors-and-widget/list-of-widgets/ab-tasty-prebuilt-widgets/search--replace-widget.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
