Find and replace text
Paste your text, say what to find and what to put instead, and replace every match in one click.
About Find and Replace Text
This is the find and replace of a text editor, in a web page. Paste your text, type what you are looking for and the page counts the matches and shows the first few in context before you change anything. You can search for plain words or use a regular expression with groups such as $1 in the replacement, and you can limit the search to whole words or to exact capitalisation. If the result is wrong, Undo brings the text back.
- Renaming a term across a long document.
- Cleaning up a data export before you import it.
- Swapping a date format with a regular expression.
- Removing a repeated phrase from a pasted list.
How to use Find and Replace Text
Step 1
Paste your text into the big box.
Step 2
Type the text to find and the replacement, and set the options.
Step 3
Check the match count, press Replace all and use Undo if needed.
Good to know
- Whole word matching treats letters, digits and the underscore as parts of a word. A search for cat skips concat but finds the word in the cat sat.
- Regular expression mode uses JavaScript syntax. Special characters such as the dot and the plus sign have a meaning there, so switch it off for plain searches.
- Undo goes back one step at a time, but only while this page stays open.
Common questions
How do I use part of the match in the replacement?
Turn on regular expressions, put parentheses around the part you want in the find box, and write $1 for the first group, $2 for the second and $& for the whole match.
Why does my regular expression say it is not valid?
The pattern has a mistake, such as an unclosed bracket or a stray backslash. The message shown comes from your browser and usually points to the problem.
Can it replace across several files?
No. It works on the text in the box. Paste in one file at a time.