Find and Replace
Paste text, enter what to find and what to replace it with, and see every replacement at once, with plain text or regular expressions.
Find and Replace
Find and replace text with plain or regular-expression matching, and see how many replacements were made.
Enter some text and what to find to see the replacements.
Your text is processed in your browser and is not uploaded.
How it works
- Type or paste text, enter the text to find, and enter the replacement. Leave the replacement empty to delete matches.
- Match case and Whole words only refine what matches. Turn on Use regular expression for patterns.
- The count shows how many replacements were made. Copy the result with the Copy button.
Counting rules
- In plain mode the find and replacement text are literal: “.” matches only a dot and “$” has no special meaning.
- In regular-expression mode the replacement can use $1, $2 for groups, $& for the whole match and $<name> for named groups.
- Whole words only treats letters, numbers and underscores as word characters, so “cat” does not match inside “concat”.
- A regular expression that can match nothing, such as x*, is allowed, and each empty match counts as a replacement.
- Regular expressions run in the background and are stopped after 2 seconds, so a very complex pattern shows an error instead of freezing the page.
- Your text is processed in your browser and is not uploaded.
Worked example: Replacing “cat” with “dog” in “cat Cat concat” gives “dog Cat condog” (2 replacements, matching case).