Unstructured Text
Find and Replace
Replace every occurrence of a word, phrase or pattern in one go.
When to use it
Typical uses: Updating a product name or date across a long document; Removing unwanted words or characters; Converting separators, such as semicolons to commas.
In a pipeline
Text InputFind and ReplaceText Output
Settings
| Setting | Type | Required | Default or hint |
|---|---|---|---|
| Text column | select | — | Text |
| Find | text | Yes | Text to find |
| Replace with | text | — | Replacement (can be empty) |
| Match case | checkbox | — | false |
| Whole words only | checkbox | — | false |
| Use regular expression | checkbox | — | false |
| Generate New Column | checkbox | — | false |
| New Column Name | text | — | Default: <column> Result |
| Insert After | select | — | After the column |
| When a value cannot be converted | select | — | stop |
Example
Find and Replace: an example
- Find=cat
- Replace with=dog
- Whole words only=Ticked
| Text |
|---|
| The cat sat on the mat. Cats and category pages are different. |
| Text |
|---|
| The dog sat on the mat. Cats and category pages are different. |
Finding “cat” and replacing it with “dog”, with Whole words only ticked:
Worth knowing
- How do I delete text instead of replacing it? Leave the “Replace with” box empty.
- How do I replace line breaks? Tick Use regular expression and search for \n.
- Which regular expression features are supported? The tool uses JavaScript regular expressions with Unicode support, including groups, lookarounds and classes such as \p{L} for any letter.
- Works on any text column, not only Text Input's: pick it under Text column. Tick Generate New Column to keep the original next to the result.