Find and replace

Try Find and Replace

Find and Replace inputs

Loading calculator. If this message stays visible, enable JavaScript and reload.

Worked example

Start with the original text “Hello world. Hello again.”, Find “Hello”, and Replace with “Hi”. The result is “Hi world. Hi again.”, with a replacement count of 2 — both exact, capital-H occurrences are changed, and the two full stops stay in place. Substring matching also applies: in “cat scatter cat”, finding “cat” and replacing it with “dog” gives “dog sdogter dog”, with 3 replacements, because the “cat” inside “scatter” matches too.

How to use Find and Replace

Paste the text into “Original text”, type the exact sequence to change in “Find” and its replacement in “Replace with” (leave it empty to delete), then click “Calculate / Run” and read the replacement count. Matching is literal and case-sensitive, so check the count and the revised wording before copying it out — “Hello” will not match “hello” or “HELLO”.

Related tools

Use find and replace to substitute every exact occurrence of a word fragment, phrase or character in pasted text. Enter Original text, put the sequence to change in Find, and enter its replacement in Replace with. Choose Calculate / Run to see the revised text and the number of replacements.

MoneyOr uses literal, case-sensitive matching. It does not interpret regular expressions or automatically restrict a search to whole words. Leaving Replace with empty deletes matching sequences. These rules make a short, predictable edit possible, but they also make a careful preview essential: replacing a small fragment can change larger words that contain it.

Making a controlled text replacement

What exactly does find and replace match?

In this find and replace tool, the Find field matches an exact sequence of characters. Every non-overlapping occurrence of that sequence in Original text is replaced. Capital letters, spaces and punctuation matter. Finding Hello does not also find hello or HELLO, and finding blue paper does not match a version with two spaces between the words.

The match can occur inside a larger word. In cat scatter cat, finding cat and replacing it with dog gives dog sdogter dog. There are three replacements. The middle change is mechanically correct under substring matching, even though it creates an unwanted word. This is why a short search term needs particular scrutiny.

There is no dictionary, grammar model or subject knowledge behind the operation. It cannot tell whether a repeated product name refers to the current product, a quoted historical name or a separate item. Decide which passages belong in the input before submitting the replacement, then review every kind of context in which the search sequence appears.

How do I make and verify an edit step by step?

  1. Save the unchanged passage in your own document.
  2. Paste the material to edit into Original text.
  3. Enter the exact old sequence in Find.
  4. Enter the intended new sequence in Replace with, or leave it empty for deletion.
  5. Choose Calculate / Run and read the replacement count.
  6. Inspect the revised wording before copying it to the destination.

Use the smallest passage that contains the intended edits. If a label must change in one paragraph but remain in a quotation elsewhere, process that paragraph rather than the whole document. This form has no next-match, skip-match or selection-only control within the pasted input. Every occurrence that fits its rule is eligible for replacement.

Check the replacement itself before running. An extra leading space in Replace with becomes part of every inserted sequence. A missing final letter is repeated throughout the result. Testing on a short representative sample helps catch those mistakes before you apply the same rule to a long passage.

After copying, inspect the destination too. Its editor may apply smart punctuation, normalise line endings or interpret markup. The tool's plain-text result and the destination's displayed formatting are separate. Keep the original until you have confirmed both the revised wording and its final presentation.

Choose sample cases that reflect the real edit. For a name change, include the name alone, the name followed by punctuation and a longer word containing the same letters. For a symbol change, include the exact symbol alongside similar-looking alternatives. A test containing only an obvious matching phrase cannot reveal the unintended contexts that make a broad replacement risky.

Which worked examples show replacement and deletion?

Each row is an independent test checked against the engine. The examples distinguish exact text matching from assumptions that are common in full document editors, such as automatic whole-word matching or case-insensitive searching.

Original textFindReplace withResultCount
Hello world. Hello again.HelloHiHi world. Hi again.2
Cat cat CATcatdogCat dog CAT1
a.b aXb.-a-b aXb1
blue-red-blueblueEmpty-red-2
aaaaaaaXXXa2
onetwothreeone0

Deletion removes only the matched sequence. The hyphens in the blue-red-blue example remain because they were not part of Find. If deleting a word leaves doubled spaces or punctuation behind, decide separately whether those characters should change. A second targeted replacement may be appropriate, but a general cleanup can affect unrelated formatting.

The count measures matching occurrences processed during that run. It is not a count of changed sentences, edited lines or corrected mistakes. Several occurrences can be on one line, and replacing a value with itself can still count a match even though the displayed text is unchanged.

Are regular expressions and replacement tokens supported?

No regular-expression mode is provided. A full stop in Find matches a literal full stop, not any character. A pattern such as \d+ searches for those literal characters; it does not mean a sequence of digits. Slashes and flags pasted around a pattern do not enable a different search engine.

The replacement is also literal. In a checked example, replacing a with $& in a a produces the literal output $& $&. It does not insert a special reference to the matched text. Capture-group substitutions and numbered backreferences are not available.

These differences are useful when changing symbols that would otherwise have special regex meanings. You can replace a literal dot or bracket without preparing a regex escape. However, this form is unsuitable when the target is a variable pattern, such as every number of a certain length. Use a pattern-aware editor for that requirement and test its rule carefully.

The implementation separates the original at the exact Find string, then joins the pieces using Replace with. MDN's String.prototype.split() reference, checked in 2026, explains separation using a string delimiter. The specific matching and counting behaviour here was checked against MoneyOr's code and test inputs.

What do zero matches, empty fields and overlapping matches mean?

Zero matches means the exact Find sequence did not occur in the supplied value. The result remains unchanged. Check case, punctuation, spaces and spelling before assuming there is a fault. A line break, non-breaking space or visually similar Unicode character can make two passages look equivalent while their stored sequences differ.

Copy a short candidate sequence directly from Original text into Find when an apparently identical typed search produces zero matches. This can help distinguish a typing mismatch from the absence of that exact sequence. Inspect any surrounding spaces included in the selection. If those spaces are copied into Find, they become part of the required match and can exclude occurrences with different boundaries.

Find cannot be empty. The engine rejects that input with a message asking for text to find. Replace with is optional, and an empty replacement means deletion. These are different states: a blank search does not mean “find everything,” while a blank replacement does have a defined purpose.

Matches do not overlap. In five consecutive a characters, searching for aa finds two complete pairs, leaving one a. Replacing each pair with X gives XXa. It does not count every possible starting position of the pair, because a character already consumed by one match is not reused in the next.

Inserted replacement text is not searched again during the same run. Replacing a with aa inserts the new sequence once per original match. It does not keep expanding forever. A later run using that expanded output as a fresh input is a separate operation and can make further changes.

How can I avoid changing the wrong words or records?

Use enough surrounding context to identify the intended sequence, and test representative cases. Adding ordinary spaces around a word can restrict some matches, but it is not a complete whole-word rule. The same word at the start of a passage or next to punctuation may then be missed. Do not describe that workaround as equivalent to a word-boundary search.

For a label update, inspect passages before and after the new label, including headings, lists and quoted text. A correct replacement count alone does not establish that the edits were semantically correct. The tool reports what its string rule did; you remain responsible for choosing where the change belongs.

A broad substitution in code or structured data can alter keys, literal values or syntax. Use the JSON validator after editing JSON, but remember that valid syntax does not prove that the intended data stayed correct. A parser can accept a value that was changed accidentally.

This is also not a complete redaction system. Removing one spelling of a name or identifier can leave variants, context and other identifying details behind. For confidential material, use an appropriate local review process. Do not infer privacy from the fact that a chosen string no longer appears.

How should I handle several replacements or a cleanup workflow?

The form has one Find and one Replace with pair. Several different replacements require separate runs, with a reviewed intermediate result becoming the next input. Write down the intended sequence before starting. Later rules can act on text inserted by earlier rules, so order can affect the final output.

For example, changing A to B and then B to C also changes the B produced by the first run. That may be intended, or it may accidentally merge two categories. If rules should operate independently on the original text, use a workflow designed for that requirement rather than assuming sequential runs are simultaneous substitutions.

Record each run's old sequence, new sequence and match count beside your saved intermediate copy. That small edit log makes a later discrepancy easier to investigate. It also distinguishes an intentional zero-match check from a rule that was never actually applied to the intended passage. Review the complete log before replacing the final saved document.

Choose related tools for distinct jobs. The extra space remover reduces recognised repeated spacing. The text splitter separates text using its delimiter settings, and the text joiner combines entries. These operations do not require inventing a replacement rule when their own behaviour already matches your goal.

If a replacement makes two lines identical, the duplicate line remover can perform a later exact-line cleanup. Inspect that decision separately: two identical lines may still represent distinct events. Keep intermediate versions so you can trace an unwanted merge back to the specific edit.

How do result controls and browser processing work?

The form is available without a tool account or fee in a modern browser. Copy result includes the displayed value and result details, so the replacement-count line can accompany the revised text. Check the copied selection before pasting into a destination that expects the passage alone.

Download CSV creates a report containing the result and details; it is not a field-aware CSV transformation of the original input. Save the first replacement as a baseline to compare it with a second run in this tab. Reset clears the result and restores the starting fields. Use Undo in the destination document to reverse an edit you pasted there.

The replacement operation processes the supplied values in your browser. Site delivery, analytics and contact handling are separate matters described in the MoneyOr privacy policy. Keep credentials and confidential records out of general-purpose test inputs. A synthetic example is enough to check case sensitivity, literal punctuation and replacement counts.

Find and replace FAQs

Can I replace just the first occurrence?

This form replaces all non-overlapping exact matches and has no first-occurrence switch. Limit the input to the particular passage you intend to edit or use an editor with a replace-next control. Do not run it on an entire document when only one repeated occurrence should change.

Does it preserve font, bold text and document layout?

The input and output are plain text. Rich formatting, images, page margins and tracked changes are not part of this operation. If a document's formatting must remain intact, use its original editor's replacement feature and review the file there instead of expecting pasted text to preserve those properties.

Can it replace content across all pages of my website?

No. It only transforms the text you paste into this page. It has no access to a site's database or published pages and does not save the result into WordPress. Website-wide changes require an authorised editing workflow with backups and checks appropriate to that system.

Why did replacing a value with itself report matches?

The count is based on occurrences of Find in the original input. A matching occurrence still exists when Replace with contains the same text. The output may therefore look identical while the count is greater than zero. That does not mean unseen edits were made elsewhere.

Does a number get recalculated when I replace its digits?

No. Digits are treated as text. Changing a digit in a price, date or identifier can alter its meaning without checking any arithmetic or format rule. Use a relevant calculator for calculations and verify the final record rather than interpreting a text substitution as a validated numerical update.

Can the original be recovered from the replaced result?

Not in general. Different original values can produce the same replacement, and deletion removes information. Keep an unchanged copy before running. A reverse replacement may change text that already contained the new phrase, so it is not a reliable substitute for the original source.

Method reference

Reviewed on 14 November 2026: MDN Web Docs, String.prototype.split(). MoneyOr's own checked implementation supplies the case-sensitive literal matching, non-overlapping count and literal replacement rules described here. Review the resulting wording in context before replacing your saved source.