Find and Replace Text
Replaces every match across a block of text, by plain string, whole word or regular expression.
Loading the tool…
How to use this tool
- Paste the text you want to edit.
- Fill in what to find and what to replace it with. Leave the replacement empty to delete every match.
- Choose whole words when renaming a column or a variable, so a short name is not matched inside a longer one.
- Select Replace all and check the count in the summary before you trust the output.
What find and replace does
The three matching modes exist because the plain one is not always enough and the powerful one is not always safe. A plain search finds your text anywhere, including inside longer words — replacing "id" plainly will happily edit the middle of "identity". Whole-word matching fixes exactly that, and is the right default for renaming a column or a variable.
Regular expression mode is there for the jobs the other two cannot do: capture groups referred to as $1 in the replacement, patterns anchored to the start or end of a line, and character classes. An invalid pattern is reported with the reason rather than silently matching nothing, and the summary always tells you how many replacements were made — zero is the answer you most need to see.