Last updated 3 September 2026
Three levels of precision
Plain text replacement is the blunt instrument, and it catches more than people expect — searching for "cat" will happily rewrite the middle of "concatenate". Whole-word matching fixes that by requiring a word boundary at each end, which is usually what you meant. Regular expressions are the precise option: they let you match patterns rather than fixed strings, and capture groups let parts of the match be carried into the replacement. That power comes with a sharp edge, so a malformed pattern is reported here rather than silently doing nothing. Everything updates live as you type, and the match count tells you whether the pattern is doing what you think before you copy anything out.
When plain replacement is not enough
A straight text swap handles most jobs, but it has one predictable failure: it matches inside other words. Replacing cat with dog across a document turns category into dogegory and concatenate into condogenate. Case sensitivity is the second trap — a case-sensitive replacement of Color silently leaves every lowercase color untouched, which is worse than doing nothing because it looks finished.
This is what regular expression mode is for. A word boundary marker, \b, restricts a match to whole words, so \bcat\b leaves category alone. Beyond that, \s+ collapses any run of whitespace, ^ and $ anchor to the start and end of a line, and a captured group in parentheses can be referenced in the replacement as $1, which is how you reorder text rather than merely swapping it.
A worked example
Suppose you have a list of names as Surname, Firstname and you need them the other way round. A find-and-replace cannot do that as plain text, because the values differ on every line. As a regular expression it is one operation: find ^(\w+), (\w+)$ and replace with $2 $1. The two parentheses capture each name, and the replacement puts them back in the opposite order.
One habit worth keeping regardless of mode: check the match count before replacing. If you expect twelve occurrences and the tool reports two hundred, something in your pattern is broader than you intended, and finding that out before the replacement is much cheaper than after it.
Common questions
What does whole words only actually match?
It requires a word boundary on both sides of the match, so “cat” matches the word cat but not the middle of “concatenate”. Boundaries fall between letters or digits and anything else, including punctuation and spaces.
How do capture groups work in the replacement?
With regular expression mode on, brackets in the pattern create numbered groups, and $1, $2 and so on insert them into the replacement. Searching for (\\w+)@(\\w+) and replacing with $2 keeps only what followed the at sign.
What happens if my regular expression is invalid?
The error is shown and the original text is left untouched. Nothing is replaced until the pattern is valid, so a half-typed expression cannot damage your text.
Is my text uploaded anywhere?
No. The replacement runs in your browser and nothing is sent to a server.
Why did my replacement change parts of other words?
Plain text matching finds the sequence anywhere, including inside longer words — replacing cat turns category into dogegory. Switch to regular expression mode and wrap the term in word boundaries, as in \bcat\b, to match only whole words.
How do I swap the order of two parts of each line?
Use capture groups. Find ^(\w+), (\w+)$ and replace with $2 $1 to turn Surname, Firstname into Firstname Surname. The parentheses capture each part, and the numbered references put them back in a different order.
Is my text uploaded when I use this?
No. The matching and replacement run entirely in your browser using JavaScript. Nothing is transmitted or stored on a server, which is why the tool works on documents you would not want to paste into a hosted service.