# 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](/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="/files/5bxR0NC7z2jGuTQk7lZM" 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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
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>
```

The question should be specific, self-contained, and written in natural language.
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.
