Regex Escape & Extract

Two regex chores in one place. Escape any text — a price, a file path, a URL — so it matches literally inside a regular expression, ready to copy or wrap in new RegExp(). Then extract data: give a pattern with capture groups and some text, and every match lands in a table with one column per group — named groups become the column headers — to copy into a spreadsheet or download as CSV. It's free and runs entirely in your browser.

Characters escaped

CharacterEscaped
.\.
* + ?\* \+ \?
( ) [ ] { }\( \) \[ \] \{ \}
^ $ |\^ \$ \|
\\\
/ (optional)\/

When to use it

  1. Search for user input literally without it being read as regex syntax.
  2. Pull every email, ID or price out of a block of text into a spreadsheet.
  3. Turn log lines into columns with named groups.
  4. Check what each capture group actually captures.

How to Use

  1. Type text in Escape to get a literal-safe pattern.
  2. In Extract, enter a pattern with capture groups and the text to search.
  3. Review the table of matches and groups.
  4. Copy it or download it as CSV.

Features

  1. Correct escaping for u and v flags
  2. Optional slash escaping
  3. Matches and groups as a table
  4. Named groups as columns
  5. Tab-separated copy and CSV export
  6. Protection against runaway patterns
  7. 100% client-side

FAQs

Which characters need escaping in a regex?

. * + ? ^ $ { } ( ) | [ ] and \. Escape / too if the pattern goes in a /…/ literal.

Should I escape the hyphen?

Not outside a character class. With the u or v flag, \- is actually a syntax error.

How do named groups work?

Write (?<name>…) in the pattern; that group's text appears under a column called name.

Can I get the results into Excel or Sheets?

Yes — copy as tab-separated text and paste, or download the CSV.

Is my text uploaded?

No. Matching happens in your browser.

Technical Details

Escaping turns text into a pattern that matches it literally by putting a backslash before each regex syntax character — . * + ? ^ $ { } ( ) | [ ] and backslash itself. Only those characters are escaped: escaping a hyphen, a common habit, is a syntax error once the u or v flag is on, and the tests check that escaped text matches itself under no flag, u and v. The forward slash can be escaped too for use inside /…/ literals. Extraction runs the pattern globally over the text using the same matching engine as the site's Regex Tester, with a time budget and match cap so a catastrophic pattern can't freeze the page, and turns every match into a row: the whole match, then each capture group. When the pattern uses named groups such as (?<user>…), those names become the column headers. The table can be copied as tab-separated text, which pastes straight into a spreadsheet, or downloaded as CSV with proper quoting.

Developer Tools

Developer Tools

  • AI Prompt Generator
  • Combine Files for AI
  • Freelance Rate Calculator
  • H-1B Wage Level Worksheet
  • Keyboard Tester
  • localStorage Viewer
  • Public API Directory
  • Tech Stack Decision Matrix