How find and replace works
Find and replace searches a block of text for a piece you specify and swaps every match for new text. In plain mode the tool treats what you type as ordinary text, so characters like dots, brackets, and dollar signs are searched for literally. Every match in the text is replaced, not only the first.
Regular expression mode treats the search field as a pattern instead. A pattern can describe a class of text, such as "any run of digits" or "a word followed by a comma", rather than one fixed string. This is powerful for cleanup work, but it also means special characters like a dot, a star, or a bracket have a meaning of their own and must be escaped with a backslash to match literally.
Everyday uses
Typical jobs include correcting a name used throughout a draft, updating a product name or date in a template, swapping a delimiter in a list (for example commas for semicolons), removing unwanted characters by replacing them with nothing, and cleaning pasted text that has repeated spaces or stray symbols.
With regular expressions you can go further: reformat dates, strip tags or numbering from the start of lines, or collapse several blank lines into one. Developers use it for quick refactors of names or paths in snippets. If you are comparing two versions of a text after a change, the Text Diff Checker shows what changed, which is a good double check after a large replacement.
How to find and replace with this tool
- Paste your text into the Text box. It begins with a sample sentence about a fox.
- Type what to look for in Find and the new text in Replace with.
- Tick Use regex if your search is a pattern. Tick Case sensitive if capitalization must match exactly. By default, case is ignored and regex is off.
- Read the count under the fields, which shows how many replacements were made, and check the Result box.
- Click Copy to copy the result.
The result updates live as you type. The original text in the input box is never changed, so you can adjust your search and see a new result each time. If the Find field is empty, no replacement happens.
Cautions and limits
Every match is replaced, and there is no step-by-step confirmation, so check the count before copying. A short search such as "he" will also match inside "the" and "other". The tool has no whole-word option, but in regex mode you can wrap a word in \b markers, for example \bcat\b, to match only the full word.
In regex mode, an invalid pattern shows a red error message and leaves the text unchanged. In the replacement field, the usual JavaScript replacement codes apply: $& inserts the matched text, and $1, $2 insert captured groups when your pattern has them. In plain mode, those same codes in the Replace field are still interpreted, so a literal dollar sign followed by a digit or ampersand may not come out as typed.
Everything runs in your browser and nothing is uploaded. For removing repeated lines specifically, Remove Duplicate Lines is simpler.