Find and Replace in Selected CSV Columns (Regex)

Applies a regex replacement to selected columns and reports the number of changed cells with examples.

Use the tool

Why this tool exists

Plain find and replace works on the whole text and breaks quoted fields. Here the CSV is parsed first and the pattern is applied cell by cell, in only the columns you name.

Use groups like (\d{3})-(\d{4}) and $1 $2 in the replacement. Add the i flag to ignore case; g is on by default. The summary shows up to five before and after examples so you can catch a wrong pattern before copying the result.

How to use it

  1. Paste the CSV.
  2. List the columns to change, or leave blank for all.
  3. Type the pattern, the replacement and the flags.
  4. Check the examples, then copy or download.

Frequently asked questions

Which regex flavour?

JavaScript regular expressions.

Is the header changed?

No, only data rows.

Can I use capture groups?

Yes, $1, $2 and $& work.

A wrong pattern?

Nothing is saved. Change it and run again.