Share via

Using wildcards

David Ceruti 0 Reputation points
2026-03-30T15:31:10.8566667+00:00

Good day,

I'm editing a thesis and I need to correct some formatting. Citations of respondents are currently given as Respondent 01. and the must be changed to (Respondent 01). So Respondent 01. must be changed to (Respondent 01), Respondent 02. to (Respondent 02). etc.

Using search and replace I'm using Respondent 0([0-9]) to search for the terms and it's working fine; the problem is with the replace - I've tried all sorts of strings but I can't get it to return the same number as in the one I'm trying to replace

Please help and thanks in advance

Microsoft 365 and Office | Word | For home | Windows
0 comments No comments

3 answers

Sort by: Most helpful
  1. Bob Jones AKA CyberTaz MVP 436K Reputation points
    2026-03-30T17:22:45.48+00:00

    This works on a Mac so it should work on Windows as well, assuming all respondent numbers are 2 digits

    • Find What: Respondent ??
    • Replace With: (^&)

    The ^& code represents the Find What Text

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments

  2. Stefan Blom 342.4K Reputation points MVP Volunteer Moderator
    2026-03-30T18:08:38.95+00:00

    Bob's suggestion should definitely work in Word for Windows, with two-digit numbers.

    Don't forget to select the "Use wildcards" option in the Find & Replace dialog box, though.

    User's image

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  3. AI answer

    2026-03-30T15:31:28.18+00:00

    Use a wildcard Find/Replace with a captured group and a backreference.

    1. Open Find and Replace (Ctrl+H).
    2. Select More >> and check Use wildcards.
    3. In Find what, enter:
         Respondent 0([0-9]).
      
      This captures the last digit in ([0-9]).
    4. In Replace with, enter:
         (Respondent 0\1)
      
      \1 reuses the digit captured in ([0-9]).
    5. Choose Replace All (or Replace to step through).

    This converts Respondent 01.(Respondent 01), Respondent 02.(Respondent 02), etc.

    To search for the literal period, it is sufficient to type . in the Find what box when Use wildcards is enabled; Word treats it as a literal unless used as a wildcard pattern in this context.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.