Be able to find and replace text including matching case, whole words

Published by Patrick Mutisya · 8 days ago

ICT 0417 – Document Production: Find and Replace

17 Document Production

Objective

Be able to find and replace text, including the use of the Match case and Whole words options.

Why Use Find and Replace?

  • Save time when correcting repeated errors.
  • Update terminology or branding across an entire document.
  • Ensure consistency of spelling, punctuation, and formatting.
  • Reduce the risk of missing a change when editing manually.

Basic Steps (Common to Most Word Processors)

  1. Open the Find and Replace dialog.

    • Microsoft Word: Ctrl+H
    • LibreOffice Writer: Ctrl+H or Ctrl+F then click the Replace tab.

  2. Enter the text you want to locate in the Find field.
  3. Enter the replacement text in the Replace with field.
  4. Choose any required options (see below).
  5. Click Replace to change the current occurrence, or Replace All to change every occurrence that meets the criteria.

Important Options

OptionPurposeEffect on Search
Match caseDistinguishes between uppercase and lowercase letters.Only finds text that matches the exact capitalisation entered.
Whole wordsEnsures the found text is a complete word, not part of a larger word.“cat” will not match “concatenate” when this option is selected.
Use wildcards / regular expressionsAllows pattern‑based searching (e.g., any digit, any number of characters).Advanced searches such as “find any 3‑digit number” can be performed.

Examples

Assume the following paragraph is part of a document:

“The apple is red. An apple a day keeps the doctor away. Apples are tasty.”

Example 1 – Simple Replace (no options)

Find: apple

Replace with: orange

Result after Replace All:

“The orange is red. An orange a day keeps the doctor away. Oranges are tasty.”

Example 2 – Match case

Find: Apple (capital A)

Replace with: Pear

Match case selected.

Only the capitalised “Apple” would be replaced; lower‑case “apple” remains unchanged.

Example 3 – Whole words

Find: cat

Replace with: dog

Whole words selected.

If the document contains “concatenate”, it will not be altered because “cat” is not a whole word there.

Practical Tips for Exams

  • Read the question carefully – it will specify whether to use Match case or Whole words.
  • Always preview the first replacement before using Replace All.
  • Use Find Next to step through each occurrence and confirm it meets the criteria.
  • Remember that punctuation is part of the word when Whole words is active (e.g., “cat.” is a whole word).
  • When using wildcards, test the pattern on a small sample to avoid unintended changes.

Common Pitfalls

  • Forgetting to deselect Match case when the case is irrelevant.
  • Replacing part of a word unintentionally because Whole words was not selected.
  • Using Replace All without a final check, leading to errors that are hard to reverse.

Suggested diagram: Flowchart showing the decision process for using Match case and Whole words options during a Find and Replace operation.