What a find and replace tool actually does
You hand it a block of text and a rule. It scans the text for everything that fits the rule and swaps each hit for something new, in one pass. Renaming a variable across a file, cleaning pasted web copy, fixing a product name that was spelled three ways: it is the same move every time.
This version is built for quick bulk edits online. No account, no upload, no editor to open. The result is ready the moment you stop typing.
<p class="lead">Hi</p><p className="lead">Hi</p>Four switches, four different jobs
Each specimen below runs the same search with the switch off, then on. Green is what gets changed.
Apple, apple, APPLEApple, apple, APPLEcat, category, concatcat, category, concatOrder 4821 left on 2027-01-07Order 4821 left on 2027-01-07red, red, redred, red, redRegular expressions without the headache
Regex looks scary mostly because of the punctuation. Underneath, it is a short list of building blocks, plus one trick that is worth learning properly: groups.
Brackets in the search remember what they caught. In the replacement, $1 recalls the first catch and $2 the second, in any order you like.
(\w+) (\w+)Replace$2, $1TextGrace HopperResultHopper, GraceRecipes worth keeping close
Press Try it and the rule, the switches and a sample text load straight into the tool above.
| Job | Find | Replace with | Switches | |
|---|---|---|---|---|
| Port HTML attributes to JSX | class=" | className=" | none | |
| Swap non-breaking space entities for real spaces | | one space | none | |
| Collapse runs of spaces into one | [ ]{2,} | one space | Regex | |
| Reorder words with capture groups | ^(\w+) (\w+)$ | $2, $1 | Regex | |
| Remove every HTML tag | <[^>]+> | nothing | Regex | |
| Turn a comma list into one item per line | ,\s* | \n | Regex | |
| Rewrite 2027-01-07 as 07/01/2027 | (\d{4})-(\d{2})-(\d{2}) | $3/$2/$1 | Regex | |
| Rename one variable without touching its cousins | total | sum | Match caseWhole word |
Three ways a replacement goes sideways
Almost every bad bulk edit is one of these. Each has a quick fix.
The cat in the categoryThe dog in the dogegoryred, bluered to blueblue, blueblue to greengreen, green<b>bold</b> and <i>it</i><b>bold</b> and <i>it</i>Habits that save you from redoing it
- Read the highlight before you copy anything. The green marks sit right on your text, so you can see what a rule will touch.
- Start with plain text. Reach for Regex when you catch yourself typing the same thing with small variations.
- Give each rule one job. Three short rules are easier to debug than one monster pattern.
- Use “Use as input” to build on a result. Undo is one click away if you overshoot.
- Try the rule on a few lines first, then paste the full document.
Questions people ask
Is my text sent to a server?
No. Matching and replacing happen inside your browser tab, and closing the tab clears everything.
How do I replace something with a line break?
Switch on Regex, then type \n in the replace field. Use \t if you need a tab.
What does the red “Invalid pattern” message mean?
The regular expression is incomplete, usually an unclosed bracket or a stray parenthesis. The message under the field says which.
Does Whole word work with accented letters?
In plain mode, yes: ă, â, ș and friends count as letters. In Regex mode the word edge follows JavaScript’s rule and only knows A to Z, so prefer plain mode for accented text.
How is this different from Ctrl+H in my editor?
It works on pasted text without opening a file, chains several rules in order, and shows the hits live before you commit to anything.