How to Use Find and Replace Text: Steps and a Worked Example

By 1 min read

Find and replace words or patterns in text, with case and regular-expression options. This guide shows what to enter, a worked example, and the limits to keep in mind. The Find and Replace Text tool is free, needs no account and runs in your browser.

What you need

  • Text, for example The cat sat on the mat. The cat slept.
  • Find, for example cat
  • Replace with, for example dog
  • Match: choose Plain text, Regular expression
  • Case: choose Ignore case, Match case

Step by step

  1. Open the Find and Replace Text tool.
  2. Fill in Text.
  3. Fill in Find.
  4. Fill in Replace with.
  5. Choose Match.
  6. Choose Case.
  7. Read the result, which updates as soon as the inputs change.

Worked example

With these inputs:

  • Text: The cat sat on the mat. The cat slept.
  • Find: cat
  • Replace with: dog
  • Match: Plain text
  • Case: Ignore case

the tool returns:

The dog sat on the mat. The dog slept.
(2 replacements made)

How it works

String.replaceAll with an optional regular expression. Everything runs in your browser, so nothing you type is uploaded.

Things to keep in mind

Regular expressions use JavaScript syntax.

If this is not quite what you need, try Replace Text All, Text Diff Checker or Text Reverser.

More from the blog