by Allen Wyatt
(last updated April 17, 2021)
Tracey proofreads loads of documents and was wondering how to find where a word and number have been combined accidentally as the space wasn't included, such as "and317." She wonders how she can perform Find and Replace to eliminate this issue.
This sort of task can be easily done with Find and Replace. First, let's say that you just want to find occurrences that you note—a letter followed immediately by a digit. You can do that by following these steps:
At this point, Word will find and stop at the next occurrence of a letter followed by a digit. You can, at this point, make any edits desired and then continue searching.
For Tracey's purposes, though, it might be better to let Find and Replace do the heavy work. Follow these steps:
Figure 1. Getting ready to find a letter followed by a digit and insert a space.
The key to these steps is steps 3 through 5. You are telling Word that you want to do a wildcard search. Then, in step 4, you are defining a pattern for what should be found. You are specifying that you want a letter in the range A-Z or a-z followed by a digit in the range 0-9. The inclusion of the parentheses in step 4 is very important, as they define matches that can be referenced in step 5. There, the \1 indicates you want to use whatever was matched by the pattern in the first set of parentheses in step 4, and \2 indicates you want the match from the second set of parentheses. Note that between these two there is a space, so the result is that you are inserting a space between the letter and the digit.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13848) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Sarra is having a problem getting Find and Replace to behave properly when replacing italic-formatted text. This tip ...Discover More
I do a lot of searching in my documents. Sometimes the searches may not go exactly as I expected. Here are some things I ...Discover More
If you have a document that contains optional hyphens (special characters that mark where a word can be split between ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube