AAllMyToolsa pocketful of little tools
F&R

Find and replace

Text & WritingNo. 25 / 84

Replace words or regex patterns in any text, with a case toggle, a live match count and one-click copy of the result.

find is easy. replace is where the plot thickens.

work surface

Math, not advice — results are indicative.Read the disclaimer.

most-used utilities

Rename a product

Swap the old product name for the new one across a full page of copy without reading it twice.

Fix a domain

Point every staging link at the live domain before the draft goes out.

Tidy the spacing

Collapse double spaces with a pattern and leave the intentional indentation alone.

pro tips

In regex mode a dot matches any character. Escape it as \. when you mean a literal period, or switch to literal mode and let the widget do the escaping.

Case sensitivity is a switch, not a guess. Turn it on when capitalization carries meaning, like product codes or a person's name.

Test a broad pattern on a short sample first. Replacing fifty thousand matches is impressive right up until you read the result.

what it does

Paste the text, type what you want to find and type what should take its place. The result updates as you type, so there is no run button to forget and no page to reload. The match counter tells you how many swaps happened before you commit to anything.

Literal mode treats the search as plain text, which is what you want for names, prices and the word actually. Regex mode hands the pattern to JavaScript's engine, so anchors, character classes and capture groups work. Groups like $1 stay available in the replacement in regex mode; in literal mode a dollar sign is just a dollar sign.

Use it on a draft that keeps calling the product by its old name, a CSV column that needs a new separator, or a list of links that all point at the staging domain. A case-sensitive search is there for the times when May the month and may the verb need different treatment.

Everything runs in the browser and nothing is uploaded, so pasting a client's copy is no riskier than pasting it into a note. If a regex does not compile, the widget says so and leaves the text alone instead of guessing. An empty search field is ignored, and an empty replacement simply deletes the matches.

quick answers

Does it support regular expressions?

Yes. Switch to regex mode and the search box accepts JavaScript patterns, including capture groups that the replacement can reference. Literal mode stays available for anyone who would rather not think about metacharacters.

Why did my pattern find nothing?

Usually an unescaped special character, a missing group or a case mismatch. The widget reports compile errors, but a valid pattern that matches nothing is a different problem: check the sample text and the case toggle.

Does the replacement happen locally?

Yes. The swap happens in your browser with plain string operations, and nothing is sent anywhere. Close the tab and the draft is gone.