Find & Replace
Search for string or regex patterns inside any column and replace matches with new values. Run multiple find-and-replace rules across columns in one step.
Find & Replace searches every value in a column for a match and replaces it. Each rule targets one column, specifies what to find (a literal string or a regex pattern), and specifies what to replace it with. You can add as many rules as you need in a single operation, each targeting a different column.
The operation updates column values in place. No new column is created.
When to Use Find & Replace
Use this operation when specific values in a column are wrong, inconsistent, or need to be reformatted before the data is used downstream.
- Correcting typos or legacy values.
"Elec"should be"Electronics"."NY"should be"New York". Fix these with a literal string replacement. - Standardizing category labels. Multiple spellings of the same category (
"e-commerce","ecommerce","E-Commerce") break GROUP BY aggregations. Replace all variants with a single canonical value. - Stripping unwanted prefixes or suffixes. Order IDs stored as
"ORD-00123"need to become"00123"for a join. Regex handles the prefix removal cleanly. - Masking sensitive data. Replace phone numbers, email addresses, or ID patterns with
[REDACTED]before exporting to lower-privilege environments. - Reformatting patterns. Dates stored as
"01-2024"need to become"2024-01". Regex with a capture group rewrites the format without touching anything else.
Sample Dataset
The examples in this doc use the Edilitics sample orders dataset. Download it to follow along in your own workspace.
edilitics_sample_orders.csv
Sample orders dataset for hands-on practice · 500 rows
Relevant columns for Find & Replace examples:
Prop
Type
Match Types
Each rule uses one of two match types. Set this per rule before entering the find value.
String mode finds values that contain the exact text you enter. The match is literal. No special character interpretation.
| Find | Replace With | Input | Output |
|---|---|---|---|
Elec | Electronics | Elec | Electronics |
NY | New York | NY | New York |
Discharged | Released | Discharged | Released |
String mode replaces every occurrence of the find text within a value, not just the full value. If "Elec" appears inside "ElecHome", that match is also replaced.
To replace empty strings (null-like blanks stored as ""), enter nothing in the Find Value field and enter your replacement in the Replace With field.
Regex mode matches values against a regular expression pattern. Use this when the exact text varies but follows a predictable structure.
Regex expressions in Edilitics must be wrapped in forward slashes: /your-pattern/
| Pattern | Matches |
|---|---|
/\d+/ | Any sequence of digits |
/^ORD-/ | Values that start with ORD- |
/\b\d{10}\b/ | Standalone 10-digit numbers |
/[A-Z]{2,}/ | Two or more consecutive uppercase letters |
/^([^@]+)@(.+)$/ | Email address pattern |
Common regex examples:
| Find | Replace With | Input | Output |
|---|---|---|---|
/^ORD-/ | `` (empty) | ORD-00123 | 00123 |
/\b\d{10}\b/ | [REDACTED] | Call at 9876543210 | Call at [REDACTED] |
/^(\d{2})-(\d{4})$/ | $2-$1 | 01-2024 | 2024-01 |
If the regex expression is invalid or not wrapped in /slashes/, Edilitics will show a validation error when you submit and will not apply the operation.
How to Apply Find & Replace
Open the Find & Replace operation
In your Transform pipeline, click Add Operation and select Find & Replace from the operation list.
Configure the first rule
Each rule has four fields in a single row:
- Target Column: the column to search in. All column types are supported (string, numeric, datetime).
- Match Type: choose String for exact text or Regex for pattern-based matching.
- Find Value: the text or pattern to search for. For Regex, wrap in
/slashes/. - Replace With: the new value. Leave empty to delete matched text.
Add more rules (optional)
Click Add Column to add another rule row. Each rule targets one column independently. You can target the same column multiple times with different find/replace pairs.
The Add Column button is disabled until the current rule has both a target column and a find value filled in.
Remove a rule (optional)
Click the remove icon on any row to soft-delete it. The row grays out. Click the undo icon to restore it. Soft-deleted rows are excluded when you submit.
The remove icon only appears when more than one rule row exists. The first row cannot be removed.
Submit the operation
Click Submit. Edilitics applies every active rule. Each column is updated in place. A success toast confirms: "Replaced successfully!"
Verify in the preview
Check the data preview to confirm the replacements look correct. If a regex produced unexpected results, remove the operation and revise the pattern.
Before and After
Three rules applied in one operation:
category: String, find"Elec", replace"Electronics"status: String, find"Discharged", replace"Released"notes: Regex, find/\b\d{10}\b/, replace[REDACTED]
Input:
| category | status | notes |
|---|---|---|
Elec | Discharged | Call customer at 9876543210 |
Electronics | Active | No notes |
Elec | Discharged | Preferred contact: 8765432109 |
Output:
| category | status | notes |
|---|---|---|
Electronics | Released | Call customer at [REDACTED] |
Electronics | Active | No notes |
Electronics | Released | Preferred contact: [REDACTED] |
Code Equivalent
-- String replacement
SELECT
REPLACE(category, 'Elec', 'Electronics') AS category,
REPLACE(status, 'Discharged', 'Released') AS status,
-- Regex replacement (PostgreSQL/BigQuery syntax)
REGEXP_REPLACE(notes, '\b\d{10}\b', '[REDACTED]', 'g') AS notes
FROM orders;import polars as pl
df = df.with_columns([
# String (literal) replacement
pl.col("category").str.replace_all("Elec", "Electronics", literal=True),
pl.col("status").str.replace_all("Discharged", "Released", literal=True),
# Regex replacement (literal=False)
pl.col("notes").str.replace_all(r"\b\d{10}\b", "[REDACTED]", literal=False),
])After Save & Preview, the pipeline shows a DQ delta badge on this step - green if the table score improved, red if it dropped. See Data Quality Scoring for how scores are calculated.
After Save & Preview, the pipeline shows a DQ delta badge on this step - green if the table score improved, red if it dropped. See Data Quality Scoring for how scores are calculated.
Operation Reference
Prop
Type
Frequently Asked Questions
Next Steps
Text Case Conversion
Normalize casing across string columns after fixing inconsistent values.
Filter
Filter rows based on the corrected values you just standardized.
Group By
Aggregate by category columns now that all labels are consistent.
Cast Data Types
Change a column's data type after reformatting its values.
Need help? Email support@edilitics.com with your workspace, job ID, and context. We reply within one business day.
Last updated on
Manage Nulls
Drop rows with missing values or impute nulls using mean, median, mode, min, max, or constant values. Apply different strategies per column in one operation.
Round Off Values
Control decimal precision on float columns: round to 0–5 decimal places across all columns at once or per-column with different precision. Values are updated in place, no new column created.