Tools / Find & Replace (Regex)

Find & Replace (Regex).

Find and replace text with plain strings or regular expressions, capture groups and whole-word matching.

Runs in your browser

In regex mode use $1, $<name> or $& to insert captured text.

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Result
Stats
Matches

About Find & Replace (Regex)

Find & Replace works on any text you paste, from a log file to a CSV export or a block of code. In the default mode the search term is taken literally, so characters such as dots, brackets and dollar signs need no escaping, and the replacement is inserted exactly as typed. Switch on regular expressions to use the full JavaScript syntax: character classes, quantifiers, alternation, lookarounds and named groups. Captured text can be reused in the replacement with $1, $2 or $<name>, and $& inserts the whole match. For example, the pattern (\d{4})-(\d{2})-(\d{2}) with the replacement $3.$2.$1 turns ISO dates such as 2026-01-15 into 15.01.2026. Whole-word mode only matches when the term is not part of a longer word, so replacing cat leaves catalog untouched, and it works with Cyrillic and other alphabets, not only ASCII. The matches table lists the line and column of every hit along with what it was replaced by, which makes it easy to check a pattern before you copy the result. Typical mistakes are forgetting that a dot matches any character in regex mode, and writing \1 in the replacement instead of $1. Invalid patterns are reported under the field with the parser message. The whole tool runs locally in your browser.

How to Use

  1. Paste your text and type what to find.
  2. Type the replacement and switch on regex, case or whole-word options as needed.
  3. Check the matches table, then copy the result.

Frequently Asked Questions

Which regex flavour is used?

JavaScript (ECMAScript) regular expressions, compiled in Unicode mode, so an emoji counts as one character. Patterns that only work without Unicode mode are accepted too.

How do I reuse part of the match?

Wrap that part in parentheses and write $1 (or $2 and so on) in the replacement. Named groups (?<year>…) are inserted with $<year>, and $$ inserts a literal dollar sign.

Why does my pattern match too much?

Quantifiers such as .* are greedy. Add a question mark (.*?) to make them stop at the first possible end, or use a narrower class like [^,]*.

Is there a size limit?

Inputs up to 5 MB are supported. The matches table shows the first 500 matches; the count and the replacement cover all of them.

Related Tools