Replace Part of a Match in Microsoft Word with Wildcards
Question details
Replace the word pounds with lbs while preserving the number before it in a Word document.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- A document contains measurements such as 2 pounds, and the user wants to change the unit without changing the number.
- Observed behavior
- The desired result is for text such as 2 pounds to become 2 lbs, with the number and following space retained.
Identify the measurement format in your document. The wildcard example matches digits followed by one space and the word pounds, such as 25 pounds.
Use a wildcard capture group to preserve the number
Use this method when you want to replace pounds only as part of a number-and-unit match.
The parentheses capture the digits and space. The backreference \1 inserts that captured text unchanged before lbs.
In Word, open Home > Replace. On Windows, you can also press Ctrl+H.
Select More if the search options are hidden, then check Use wildcards.
In Find what, enter ([0-9]{1,} )pounds. The {1,} expression matches one or more digits, and the space inside the parentheses is preserved.
In Replace with, enter \1lbs.
Select Find Next and Replace to check individual matches. Once the results are correct, select Replace All if appropriate.

Replace the word pounds without including the number
Use a simple replacement if every occurrence of the word pounds should change to lbs.
Edit and replace text in documents with WPS Writer
WPS Office is a free, lightweight alternative with a familiar interface for editing documents and replacing text. Open existing Word files to continue working with minimal disruption; it does not fix Microsoft Word's wildcard settings.

Frequently Asked Questions
What does \1 mean in Word's Replace with box?
It inserts the text matched by the first parenthesized group in Find what. In ([0-9]{1,} )pounds, that group contains the digits and the following space.
Where do I turn on wildcards in Word?
Open Home > Replace, select More if needed, and check Use wildcards.
Why doesn't the pattern find a measurement without a space?
The pattern includes a space between the digit expression and the closing parenthesis. It matches text such as 2 pounds, not 2pounds.
Can I replace pounds without using wildcards?
Yes. In Home > Replace, search for pounds and replace it with lbs. Enable Find whole words only if you do not want to change the text inside longer words, and review matches in other contexts.




