Productivity and Utilities

CSV Regex Column Extractor

Paste a table, name a column and give a pattern with capture groups to split it into new columns.

Your numbers

CSV or tab separated text with a header row.

A column name or its number (1 is the first).

A JavaScript regular expression. Each ( ) group becomes a column.

What to do

Result

Rows that matched

3 of 4

1 row did not match.

Rows matched
3
Rows not matched
1
Capture groups
2
Column used
contact

Result

idcontactcontact 1contact 2
1Ana Ruiz (ana@example.com)anaexample.com
2Ben Okafor (ben@example.org)benexample.org
3no contact on file
4Cara Lindqvist (cara@example.net)caraexample.net
How this was calculated
  1. The pattern is tried once on the cell in the chosen column of each row. The first match is used.
  2. Each capture group becomes a new column to the right of the table. A row that does not match gets blank cells there.
  3. The pattern uses JavaScript regular expression syntax. Anchors such as ^ and $ apply to the whole cell.
  4. Download the CSV to get all the rows with the new columns.
  • JavaScript regular expressions differ in small ways from those in other languages, so test a pattern on a few rows before trusting it. Patterns that nest repeats can run for a very long time, so the page refuses the common risky shape. The table stays in this browser.

Calculated using SumPanda.com · https://sumpanda.com/csv-regex-column-extractor/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the csv regex column extractor

  1. Paste a table with a header row. Choose the column by name or number.
  2. Type a regular expression. In extract mode each capture group, written with parentheses, becomes a new column. In replace mode, type the replacement, using $1 and $2 for groups.
  3. Tick Ignore case if you need it, then read how many rows matched and how many did not.
  4. Check the first 100 rows of the result, then download the CSV for the complete table.

Formula

for each row: m = pattern.exec(cell)

extract: new column i = m[i] (blank if the row did not match)

replace: cell = cell.replace(pattern, replacement) for the first match

Patterns use JavaScript regular expression syntax and are tried once per cell. Anchors such as ^ and $ refer to the whole cell.

Contact and order columns

In the sample table the contact column holds text such as Ana Ruiz (ana@example.com). The pattern \(([^@)]+)@([^)]+)\) has two groups, so the result gains two columns holding ana and example.com. Three of the four rows match, and the row that says no contact on file gets blank cells.

On the order column the pattern ^([A-Z]+)-(\d{4})-(\d+)$ has three groups. In extract mode it returns PO, 2026 and 0142. In replace mode with the replacement $2/$3 ($1) it turns PO-2026-0142 into 2026/0142 (PO).

Writing a safe pattern

Start simple and test on a few rows. A group such as ([^@)]+) means one or more characters that are not an at sign or a closing bracket, which is more precise than a dot star. Remember that dot does not match a line break, and that a group that does not take part in a match returns blank.

Patterns that repeat a group that already repeats, such as (a+)+, can take exponential time on some text and freeze a page. The tool refuses that common shape, and skips cells longer than 2,000 characters.

Extract or replace

Extract keeps your original columns and adds the groups next to them, so you can compare. Replace changes only the chosen column and leaves cells that do not match as they were. Both modes use the first match in each cell.

To try a pattern on a single string with highlighting, use the Regex Tester. To pull email addresses and links out of text without a pattern see Extract Emails and URLs from Text.

Assumptions and limits

  • The pattern runs in this browser with JavaScript syntax. Other languages differ in lookbehind, named groups and special characters.
  • The first row is the header, and tables are limited to 20,000 data rows.
  • Cells longer than 2,000 characters are skipped, and the headline says how many.
  • Only the first match in a cell is used.
  • Nothing typed here leaves your browser.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do I get the whole match instead of a group?

Wrap the whole pattern in parentheses, so group 1 is the entire match. In replace mode you can also use $& in the replacement for the whole match.

Why is a column blank for some rows?

A row that does not match leaves its new cells blank, and a group inside an optional part of the pattern also returns blank when that part is skipped.

Why was my pattern refused?

The tool refuses a group that already repeats and is repeated again, such as (a+)+ or (\w*)*, because those patterns can run for a very long time. Rewrite it as a single repeat.

Does it change my original table?

No. The result is a new table you can copy or download. The pasted table in the box stays exactly as you typed it.