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

Document Production – Find & Replace

Objective

Students will be able to locate and replace text efficiently, using the Match case and Whole words options, and understand how the operation interacts with styles, tables, headers/footers, fields, bookmarks, document metadata and accessibility requirements.

Link to the Cambridge IGCSE ICT 0417 Syllabus

Find & Replace is a core sub‑skill in Section 17 – Document Production. It supports the following syllabus objectives:

  • Proof‑reading and validation (AO2 – apply knowledge; AO3 – evaluate text for errors).
  • Maintaining consistency of formatting and style across headings, tables and captions.
  • Ensuring accessibility and respecting copyright when altering content.

Checklist – How Find & Replace Meets Syllabus Requirements

Syllabus PointFind & Replace Relevance
Proof‑reading & validation checksQuickly correct repeated spelling, punctuation or terminology errors; run spell‑check/validation after a bulk replace.
Use of styles and formattingReplace text inside styled headings, tables or captions while preserving the underlying style definition.
Working with tables, headers & footers, fields, bookmarksSearch can be limited to the main body or extended to tables, headers/footers, footnotes, cross‑references and bookmarks.
Metadata & document propertiesFind & Replace does not alter file properties; edit author, title or keywords via File → Properties when required.
E‑safety & copyrightVerify that replaced text does not breach intellectual‑property rules or remove required attribution.
AccessibilityCheck that replacements do not break alt‑text, hyperlinks, bookmarks or other assistive‑technology cues.

Three‑Stage Algorithm (Exam‑Ready)

  1. Prepare

    • Open the Find & Replace dialog:

      • Microsoft Word: Ctrl+H
      • LibreOffice Writer: Ctrl+H (or Ctrl+FReplace tab)

    • Decide the scope:

      • Whole document (default)
      • Selection only – highlight the required text first.

    • Set “Search in” options (body, tables, headers/footers, footnotes, bookmarks) if the processor offers them.

  2. Execute

    • Enter the text to find in the Find field.
    • Enter the replacement text in the Replace with field.
    • Tick the required options (see table below).
    • Click Find Next to preview the first occurrence.
    • If the preview is correct, choose Replace or Replace All.

  3. Validate

    • Review several changed instances to confirm that formatting, style and any linked fields are retained.
    • Update fields (e.g., cross‑references, Table of Contents, page numbers) – Ctrl+A then F9 (Word).
    • Run a final spell‑check / validation routine.
    • Save the document with a new version name.

Important Options

OptionPurpose (syllabus wording)Effect on Search
Match caseDistinguishes between uppercase and lowercase letters (validation check).Only finds text that exactly matches the capitalisation entered.
Whole wordsEnsures the found text is a complete word, not part of a larger word.“cat” will not match “concatenate” or “cat‑walk”. Punctuation attached to a word (e.g., “cat.”) is treated as part of the whole word.
Wildcards / basic regular expressionsAllows pattern‑based searching for variable text.Examples (Word & Writer):

  • ? – any single character (e.g., c?t finds “cat” or “cot”).
  • * – any string of characters (e.g., pre* finds “pre”, “prefix”, “pre‑order”).
  • [0-9]{3} – any three‑digit number (advanced, but only basic wildcards are required for the exam).

When both Match case and Whole words are active, the engine checks case first, then whole‑word boundaries.

Search inSpecifies which parts of the document are examined (body, tables, headers/footers, footnotes, bookmarks).Limits the operation to the selected area, preventing unintended changes elsewhere.

Advanced Tips (Beyond the Basics)

  • Tables – Ensure “Search in tables” is ticked; replacements keep cell borders and any cell‑specific style.
  • Headers & Footers – Activate the option to include these zones; useful for updating company names, document titles or copyright notices.
  • Styled text – Replacing a word inside a heading or a paragraph style retains the original style attributes (font, size, colour).
  • Fields, cross‑references and TOC – After a replace that alters field content, press Ctrl+A then F9 (Word) to update all fields.
  • Metadata & document properties – Changing author names or titles via Find & Replace does not update the file properties; edit them separately via File → Properties.
  • Accessibility checks – Verify that alt‑text, hyperlinks, bookmarks and other assistive cues still function after the change.
  • Validation rules – If the document contains data‑validation lists (e.g., dropdowns), run the validation tool after replacing to ensure no illegal entries were introduced.

Examples

Sample paragraph:

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

Example 1 – Simple Replace (no options)

Find: apple

Replace with: orange

Result after Replace All (whole document):

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

Example 2 – Match case

Find: Apple (capital A)

Replace with: Pear

Option: Match case

Only the capitalised “Apple” in “The Apple brand” is replaced; the lower‑case “apple” remains unchanged.

Example 3 – Whole words

Find: cat

Replace with: dog

Option: Whole words

If the document also contains “concatenate”, it is left untouched because “cat” is not a whole word there.

Example 4 – Wildcards

Find: pre* (any word beginning with “pre”)

Replace with: post

Option: Match case (unchecked) & Whole words (unchecked)

“pre‑order”, “preliminary” and “pre” all become “post”.

Example 5 – Replace in tables and headers

Document contains a table heading “Product – Apple” and a header “© 2025 Apple Ltd.”.

Select Search in tables and Search in headers/footers, then:

  • Find: Apple
  • Replace with: Pear
  • Option: Match case

All occurrences in the body, table and header are updated while preserving cell borders and header formatting.

Practical Tips for Exams

  • Read the question wording carefully – it will tell you whether Match case, Whole words (or both) are required.
  • Preview the first match with Find Next before using Replace All.
  • If the scope is not the whole document, highlight the required text first.
  • Remember that punctuation is considered part of a word when Whole words is active (e.g., “cat.” is a whole word).
  • After a bulk replace:

    • Run spell‑check / validation.
    • Update all fields (Ctrl+AF9 in Word).
    • Check that the replacement still conforms to the intended style (heading vs. body).
    • If author name or document title was changed, edit the file properties via File → Properties.

  • Verify that any replaced content respects copyright and does not remove required attribution.
  • Check that accessibility features such as alt‑text, bookmarks or hyperlinks still work after the change.

Common Pitfalls & How to Avoid Them

  • Leaving “Match case” on unintentionally – leads to missed replacements when case varies.
  • Not selecting “Whole words” – can corrupt larger words (e.g., “cat” inside “concatenate”).
  • Using “Replace All” without a final check – errors become difficult to reverse; always preview the first few changes.
  • Forgetting to update fields – cross‑references, Table of Contents or page numbers may still show old text.
  • Over‑looking tables, headers or footers – these areas are often excluded by default.
  • Assuming Find & Replace edits document metadata – it does not; edit properties separately.
  • Neglecting accessibility checks – replaced text can break alt‑text or hyperlinks.

Suggested diagram: Flowchart illustrating the three‑stage algorithm (Prepare → Execute → Validate) with decision points for using Match case and Whole words during a Find & Replace operation.