Document Editing Problems

How to Find and Replace Multi-Digit Numbers in Word with Wildcards

Maira MehtabMaira Mehtab Oct 29, 2026 871 views

Question details

The user needs to locate and replace complete multi-digit numbers (such as 10 or 100) as single entities rather than modifying individual digits.

How to Find and Replace Multi-Digit Numbers in Word with Wildcards
Product
Word
Device & OS
not provided
Scenario
Editing a document that contains numerical values requiring bulk formatting, extraction, or addition of surrounding text.
Observed behavior
Using the standard '^#' code in Word only matches single digits, causing multi-digit numbers to be split and treated as separate, individual matches.
Before you start

Open your Word document and press Ctrl+H to access the Find and Replace dialog box, then click the 'More' button to reveal advanced search options.

Solution 1Recommended

Use Wildcard Expressions to Capture Complete Numbers

Enable the wildcard feature to group digits into complete numbers using bracketed expressions, allowing you to reuse the exact matched number in your replacement.

By default, Word treats each digit as a standalone character. By utilizing wildcard patterns, you can define ranges and repetitions to capture an entire string of digits as a single word.

Wrapping your search query in parentheses allows you to capture the found number. You can then insert that exact number into your replacement text using a backreference.

1
Open Find and Replace

Press the keyboard shortcut Ctrl+H to open the 'Find and Replace' dialog box.

2
Enable Wildcards

Click the 'More' button in the bottom-left corner to expand advanced options, and check the box labeled 'Use wildcards'.

3
Enter the Search Pattern

In the 'Find what' field, type (\<[0-9]{1,}\>) to capture complete numbers of any length. The parentheses capture the group, and the brackets define the digit range.

4
Enter the Replacement Text

In the 'Replace with' field, type your new text and use \1 to represent the original number. For example, typing [New Text \1 New Text] will keep the number and add text around it.

5
Apply Changes

Click 'Find Next' to verify the match is correct, or click 'Replace All' to process the entire document.

Alternative for Regional Settings: If you experience syntax errors because your regional settings use a different list separator, use (\<[0-9]@\>) in the 'Find what' box instead. The '@' symbol successfully finds numbers of any length regardless of region.
Advanced Document Editing

Easily Find and Replace Complex Text with WPS Writer

WPS Writer offers a powerful Find and Replace tool with full wildcard support, allowing you to edit numbers, regex patterns, and complex text structures seamlessly.

  1. 1. Open WPS Writer: Launch WPS Office and open your text document.
  2. 2. Access Find and Replace: Press 'Ctrl+H' to bring up the Find and Replace window.
  3. 3. Enable Advanced Search: Click the 'Options' button in the dialog and tick the 'Use wildcards' checkbox.
  4. 4. Execute Replacement: Input your wildcard query, such as \<[0-9]@\>, set your replacement text, and click 'Replace All'.
Full support for advanced wildcard searches and regex modifiers100% compatible with Microsoft Word (.doc, .docx) document formatsClean, intuitive interface for fast document processingFree to use with comprehensive editing features
microsoft office alternative - wps office

Frequently Asked Questions

How do I limit the wildcard search to exactly two-digit numbers?

In the 'Find what' box, use the expression \<[0-9]{2}\>. This specifies that exactly two digits must appear together as an independent word, ignoring single digits or numbers with three or more digits.

Why isn't my wildcard search finding any numbers?

Ensure that the 'Use wildcards' checkbox is ticked in the Find and Replace expanded options. Wildcard syntax will fail to match if this setting is disabled, because the application will search for the literal brackets and numbers you typed instead of treating them as an expression.

What does \1 mean in the replacement text box?

The \1 syntax is a backreference. It represents the first 'captured' group from your search criteria (everything enclosed inside the first set of parentheses). It tells the software to output the exact text or number it just found, enabling you to add new text around the original number without deleting it.