Cleaning
Regex Replace
Replaces text in one column using a regular expression applied to every match in the cell.
When to use it
Use it when the text to remove or reshape follows a pattern rather than a fixed value, such as stripping punctuation, currency symbols or trailing codes.
In a pipeline
File InputRegex ReplaceExport CSV
Settings
| Setting | Type | Required | Default or hint |
|---|---|---|---|
| Column | select | Yes | — |
| Regex Pattern | text | Yes | e.g. \d+ |
| Replacement | text | — | Replacement text |
Example
Reduce phone numbers to digits
- Column=Phone
- Regex Pattern=[^0-9]
- Replacement=(empty)
| Customer | Phone |
|---|---|
| Mia Osborn | (415) 555-0132 |
| Leo Park | 415-555-0198 |
| Customer | Phone |
|---|---|
| Mia Osborn | 4155550132 |
| Leo Park | 4155550198 |
Every character that is not a digit is dropped, leaving a clean numeric string.
Worth knowing
- The pattern always runs with the global flag, so all matches in a cell are replaced.
- Capture groups work in the Replacement field: $1 inserts the first group.
- An invalid pattern, or one longer than 500 characters, stops the run with an error.
- Empty cells become empty text rather than staying null.
- The quick guide at the bottom of the properties panel lists the common tokens; click one to add it to the pattern, or click an example to fill in both fields.