Word: Find and replace any number of spaces
September 13, 2010Update March 2019: Although the method below works, there’s a quicker method that uses ^w instead of wildcards. See this blog post for details: https://cybertext.wordpress.com/2019/03/29/word-a-quick-way-to-replace-multiple-spaces-with-a-single-space/
*******
Big thanks go to the late Mike Starr for sharing this tip!
If you’re editing a document written by one or more authors who don’t have a lot of Word experience/knowledge, there’s a good chance you’ll come across instances of multiple spaces where there should only be one space. The authors might have used multiple spaces to force layout (instead of tabs, styles, tables etc.), or they may have pasted words from another source into the document thus adding an extra space or two where there should only be one space.
Your job is to clean up the document — including finding all those extra spaces and removing them.
There are several methods you can use to do this (see the list at the end of this post for alternative methods I’ve documented), but the best — and quickest — method is to use a wildcard search to find any number of consecutive spaces and replace them with one space.
Here’s how:
- Press Ctrl+H to open the Find and Replace dialog box.
- Click the More button to display the search options.
- Select the Use wildcards check box (this method won’t work unless this option is turned on).
- In the Find what field, press the spacebar once followed by {2,10}. (See the Notes below about these numbers.)
- In the Replace with field, press the spacebar once.
- Click Replace All.
NOTES:
- You can use any numbers you like. The first number is the minimum number of spaces to find and replace and the second represents the maximum number of spaces to find and replace — 2,10 represents a minimum of two and a maximum of 10 consecutive spaces. If you legitimately use double spaces after a period, type {3,10} after the space instead, and if you know you’ve got long strings of spaces in the document, use a range such as {2,80}.
- You can also use this method to find all instances of two or more spaces after a period and replace them with one space. For that you’d type . {2,5} (note the space immediately after the period) in the Find what field, and a period followed by a single space in the Replace with field, as shown in the screen shot below.
Other methods and related posts:
- Another wildcard method, plus the multiple pass method: https://cybertext.wordpress.com/2009/01/11/word-replace-excess-spaces/
- Remove excess characters: https://cybertext.wordpress.com/2008/06/28/word-remove-excess-characters/
- Change the spaces after a period from one to two: https://cybertext.wordpress.com/2009/01/23/word-change-the-spaces-after-a-period/
- https://cybertext.wordpress.com/2009/01/11/word-replace-excess-spaces/
- https://cybertext.wordpress.com/2012/01/04/word-find-and-replace-multiple-spaces-after-a-punctuation-mark/
- https://cybertext.wordpress.com/2012/01/05/word-find-and-replace-multiple-spaces-before-a-number/
- https://cybertext.wordpress.com/2012/01/06/word-find-and-replace-multiple-spaces-between-words/
[Links last checked September 2010; thanks again to Mike Starr for sharing this very simple wildcard method!]
[…] https://cybertext.wordpress.com/2010/09/13/word-find-and-replace-any-number-of-spaces/ […]
by Copyediting from a copyeditor’s perspective « CyberText Newsletter May 17, 2011 at 5:32 am[…] Find and replace any number of spaces: https://cybertext.wordpress.com/2010/09/13/word-find-and-replace-any-number-of-spaces/ […]
by Word: Replace and reformat text inside square brackets using wildcards « CyberText Newsletter June 20, 2011 at 5:32 am[…] https://cybertext.wordpress.com/2010/09/13/word-find-and-replace-any-number-of-spaces/ […]
by Word: Find and replace multiple spaces after a punctuation mark « CyberText Newsletter January 4, 2012 at 6:36 am[…] https://cybertext.wordpress.com/2010/09/13/word-find-and-replace-any-number-of-spaces/ […]
by Word: Find and replace multiple spaces before a number « CyberText Newsletter January 5, 2012 at 5:30 am[…] https://cybertext.wordpress.com/2010/09/13/word-find-and-replace-any-number-of-spaces/ […]
by Word: Find and replace multiple spaces between words « CyberText Newsletter January 6, 2012 at 5:31 am[…] https://cybertext.wordpress.com/2010/09/13/word-find-and-replace-any-number-of-spaces/ […]
by Word: Replace excess spaces « CyberText Newsletter January 6, 2012 at 6:51 am[…] […] by Word: Find and replace any number of spaces « CyberText Newsletter September 13, 2010 at 5:32 […]
by Word: Remove excess characters « CyberText Newsletter January 6, 2012 at 6:52 am[…] https://cybertext.wordpress.com/2010/09/13/word-find-and-replace-any-number-of-spaces/ […]
by Word: Insert a space between a number and a letter « CyberText Newsletter February 8, 2012 at 5:30 amYou can FIND and REPLACE multiple words in Multiple docs using simple software
Download FREE from website TECHNOCOMSOLUTIONS.com
by Ajay July 15, 2012 at 4:03 amWorked beautifully.. Thanks
by ARJ November 6, 2012 at 8:04 pmI know this is a really old posting…but thank you! Have been wondering if there was a way to do this.
by George DeVrees August 9, 2014 at 1:29 amThanks you for this. I was wondering if there was a way to do it.
by atothewr September 27, 2014 at 5:54 pmNote that you could also use ^w (token to represent “white space”) in Find & Replace:
Find what=^w
Replace with=single space
Replace All
Be aware that “white space” includes the tab character, so this will change one or more tabs to a single space as well. (If that is a problem, change tabs (^t) temporarily to something else first; then restore them afterwards.)
by Eric Fletcher May 14, 2018 at 8:58 pmYou can omit the second number in {2,10} to find all two or more spaces. Just use {2,} to find any number of spaces (more than 2).
by Shrish Benjwal March 24, 2021 at 10:53 am[…] Find and replace any number of spaces: https://cybertext.wordpress.com/2010/09/13/word-find-and-replace-any-number-of-spaces/ […]
by Word: Reformat text inside quote marks using wildcards | CyberText Newsletter April 16, 2021 at 3:48 pm