Find & Replace

Support plain text and regex, optional case-insensitive, replace everywhere

Find and replace: the difference between plain text and regex mode

The essential difference between the two modes

Plain modeRegex mode
Find fieldLiteral substringPattern (metacharacters carry special meaning)
Special charactersAll ordinary, no escaping needed. * + ? ( ) [ ] { } | ^ $ \ must be escaped
Replace fieldWritten verbatim$1, $& and similar reference capture groups
Typical useRename a token, swap a separator, delete a wordReformat, normalize by pattern, extract and reorder

For "replace a word", plain mode is the safest choice — you do not think about any escaping at all. Switch to regex mode and a . suddenly means "any character", a ( becomes the start of a group, and an unpaired bracket throws an error on the spot.

Replacement references in regex mode

This is where regex replacement earns its keep — it does not merely substitute, it restructures:

Replacement syntaxMeaning
$1 $2Contents of the first, second capture group
$&The entire matched text
$ followed by a backtickText before the match (that character cannot be written directly here; see MDN on String.replace)
$'Text after the match
$$A literal dollar sign

Practical example — turn 2026-01-15 into 15/01/2026: find (\d{4})-(\d{2})-(\d{2}), replace with $3/$2/$1. Plain mode cannot do this, because it is a "reorder", not a "replace".

Another one: indent the start of every line. Find ^(\S), replace with $1 (with the multiline flag on).

Three places that bite

Check before you act

Batch replace is irreversible unless you kept the original. Suggested flow:

  1. First confirm the pattern matches what you intend with the regex tester — look at match count and each matched span.
  2. Watch for accidental matches. Replacing id will hit userId, valid, hidden — use a word boundary \bid\b to avoid that.
  3. Read through the result after replacing; do not just trust "replacement done".
  4. Keep a copy of the source. The output is read-only, and the original still sits in the input box, but if you keep editing inside the input box you overwrite it.

Replacement runs locally in your browser; text containing sensitive information is never uploaded.

FAQ

Can the replacement box use $1 in regex mode?

Yes. The replacement supports backreferences like $1 $2 referencing capture groups in the regex.

How do ignore-case and regex work together?

When both "Regex" and "Ignore case" are checked, the i flag is added automatically so matching is case-insensitive.