Calculator

What the Find and Replace does

Find and Replace: calculates Replacements and Output from Text, Find and Replace with. Example: find colour, replace with color and treat find as a regular expression No gives replacements 2.

Enter Text, Find, Replace with and Treat Find as a regular expression and the Find and Replace reports Replacements and Output. Each change is reflected immediately, which suits quick what-if comparisons.

Consistent formatting is the difference between a draft and something publishable. The Find and Replace exists to take that particular chore off your hands.

Your text stays in the browser, safe for drafts, private notes or anything unpublished.

The meaning of each field, the formula in use, and a worked example that starts from the default inputs are all further down.

What do the Find and Replace fields mean?

The Find and Replace uses 6 inputs. Every box starts with a working value, so there is a real result on screen before you touch anything.

FieldWhat to enterDefault
Text paste or type any amount of text The colour of the harbour is grey. Colour, harbour, grey: British spelling throughout.
Find optional colour
Replace with optional color
Treat Find as a regular expression choose from Yes or No No
Case sensitive choose from Yes or No No
Whole words only choose from Yes or No No

How does the Find and Replace work?

Replacements and Output ← f(Text, Find, Replace with, Treat Find as a regular expression, Case sensitive, Whole words only)

Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same calculation.

The guard clauses run before the formula does, which is why mistakes surface next to the field.

Worked example

These are the values the Find and Replace loads by default, and the result it produces from them. The figures are the tool’s live defaults and its live output, so you can reproduce them exactly.

Inputs
TextThe colour of the harbour is grey. Colour, harbour, grey:…
Findcolour
Replace withcolor
Treat Find as a regular expressionNo
Case sensitiveNo
Whole words onlyNo
Result
Replacements2
OutputThe color of the harbour is grey. color, harbour, grey: British spelling throughout.

How to use it

  1. Paste your content into Text.
  2. Set Find.
  3. Put Replace with.
  4. Pick a value for Treat Find as a regular expression: the options are Yes or No.
  5. Pick a value for Case sensitive: the options are Yes or No.
  6. Pick a value for Whole words only: the options are Yes or No.
  7. Because it recalculates as you type, you can dial a value in rather than guessing and re-running.
  8. You get Replacements and Output back.
  9. The link encodes your inputs, so saving it is enough to reproduce the result later.

What this tool does not do

  • Very large pastes are limited by your browser memory rather than a server quota.
  • Word and character definitions vary between tools: this one counts whitespace-separated tokens.
  • Results are informational: check anything consequential against a second source.

Frequently asked questions

Text, Find, Replace with, Treat Find as a regular expression, Case sensitive and Whole words only. That is the whole form. Defaults are loaded for all of them, letting you treat it as a what-if tool rather than a data-entry form.

With the values loaded when the page opens, replacements comes out as 2. That number tracks the inputs, so a small edit shows its sensitivity immediately.

Not at all: the whole thing runs offline once the page has loaded, which tells you nothing is being sent.

Free, and there is no upsell. The whole tool is the free version.

Reliable for the case described. Where more than one convention exists, the method section says which one is used.

YoursTools Team
Product & Engineering

Builds and maintains every calculator on YoursTools.