---
title: Find and replace
description: Replace values in specified columns using complete match, substring, or regex modes.
category: Data Transformation
tags: [replace, find, regex, match, substitution]
---

# Find and replace

## Description

The **Find And Replace** activity replaces values within selected columns based on user-defined rules. This is helpful for standardizing inconsistent text, correcting values, or transforming entries using exact match, partial match, or regular expressions.

> **Use Case**  
> Replace all occurrences of “HP” with “HP Inc.” in `brand_names` column or standardize spelling differences (e.g., "Fastrack" to "Fastrack Inc").

---

## Input

| Type | Description                                                          |
| ---- | -------------------------------------------------------------------- |
| Data | A dataset with one or more columns to update using replacement rules |

---

## Output

| Type             | Description                                                    |
| ---------------- | -------------------------------------------------------------- |
| Transformed Data | The modified dataset with values replaced as per configuration |

---

## Configuration Fields

| Field Name                  | Required | Description                                                                                                 |
| --------------------------- | -------- | ----------------------------------------------------------------------------------------------------------- |
| **Column Map**              | Yes      | Define the columns and their associated replacement rules. Each column will have its own settings.          |
| &nbsp;&nbsp;• Column Name   | Yes      | Column on which replacement rules will apply.                                                               |
| &nbsp;&nbsp;• Matching Mode | Yes      | Type of match used to find values: <ul><li>Complete Value</li><li>Substring</li><li>Regex Pattern</li></ul> |
| &nbsp;&nbsp;• Matching Case | No       | Specify match case: <ul><li>Case-Sensitive</li><li>Case-Insensitive</li></ul>                               |
| **Replacement**             | Yes      | Define the pairs of values to find and their replacements. Multiple rules can be added.                     |
| &nbsp;&nbsp;• Find          | Yes      | The text or pattern to search for.                                                                          |
| &nbsp;&nbsp;• Replace       | Yes      | The value to replace the matched text with.                                                                 |

---

## Sample Input

| product_id | product_name | brand_names            |
| ---------- | ------------ | ---------------------- |
| P001       | Smartphone   | Apple, Samsung, Google |
| P002       | Laptop       | Dell, HP, Lenovo       |
| P003       | Headphones   | Bose, Sony, Sennheiser |
| P004       | TV           | LG, Samsung, Sony      |
| P005       | Smartwatch   | Fitbit, Garmin, Apple  |

---

## Sample Configuration

| Field                | Value                                  |
| -------------------- | -------------------------------------- |
| Column Name          | brand_names                            |
| Matching Mode        | Substring                              |
| Matching Case        | Case-Insensitive                       |
| Find → Replace Pairs | HP → HP Inc., Fastrack → Fastrack Inc. |

<!-- ![alt text](find-and-replace-img.png) -->

---

## Sample Output

| product_id | product_name | brand_names                  |
| ---------- | ------------ | ---------------------------- |
| P001       | Smartphone   | Apple, Samsung, Google       |
| P002       | Laptop       | Dell, HP Inc., Lenovo        |
| P003       | Headphones   | Bose, Sony, Sennheiser       |
| P004       | TV           | LG, Samsung, Sony            |
| P005       | Smartwatch   | Fastrack Inc., Garmin, Apple |

---

> Use **Regex Pattern** for advanced pattern-based replacements like correcting phone numbers, removing special characters, or formatting codes.
