Group:  Microsoft Word ยป microsoft.public.word.newusers
Thread: What are the gotchas?

Geek News

What are the gotchas?
Island Girl 10/27/2008 8:36:39 PM
I just tried what seems to me like a too-simple way to replace two or more
spaces after a word or the end of a sentence, and that is to search for white
space (^w) and replace with one space by just pressing the space bar once in
the replace box.

It seems too good to be true, so before I adopt this approach, please tell
me what could go wrong, assuming the material is just regular paragraphs of
text.

Thanks!
Re: What are the gotchas?
Jay Freedman <jay.freedman[ at ]verizon.net> 10/27/2008 11:50:55 PM
On Mon, 27 Oct 2008 13:36:39 -0700, Island Girl
<IslandGirl[ at ]discussions.microsoft.com> wrote:

[Quoted Text]
>I just tried what seems to me like a too-simple way to replace two or more
>spaces after a word or the end of a sentence, and that is to search for white
>space (^w) and replace with one space by just pressing the space bar once in
>the replace box.
>
>It seems too good to be true, so before I adopt this approach, please tell
>me what could go wrong, assuming the material is just regular paragraphs of
>text.
>
>Thanks!

The only thing that occurs to me is this: the white space code ^w matches both
spaces and tab characters. So if your document contains one or more tabs and
spaces together, in any order, then the replacement will turn that into a single
space. If you were counting on the tabs to align text, you won't get that effect
any more.

If you want to be sure you're changing only occurrences of multiple spaces,
click the More button and check the box for "Use wildcards". Then use the search
term

[ ]{2,}

(with a space between the brackets) and replace with a single space character.


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Re: What are the gotchas?
Island Girl 10/28/2008 1:41:00 AM
I hadn't thought of that, Jay. I always value your input and will certainly
take your suggestion. Thanks!

"Jay Freedman" wrote:

[Quoted Text]
> On Mon, 27 Oct 2008 13:36:39 -0700, Island Girl
> <IslandGirl[ at ]discussions.microsoft.com> wrote:
>
> >I just tried what seems to me like a too-simple way to replace two or more
> >spaces after a word or the end of a sentence, and that is to search for white
> >space (^w) and replace with one space by just pressing the space bar once in
> >the replace box.
> >
> >It seems too good to be true, so before I adopt this approach, please tell
> >me what could go wrong, assuming the material is just regular paragraphs of
> >text.
> >
> >Thanks!
>
> The only thing that occurs to me is this: the white space code ^w matches both
> spaces and tab characters. So if your document contains one or more tabs and
> spaces together, in any order, then the replacement will turn that into a single
> space. If you were counting on the tabs to align text, you won't get that effect
> any more.
>
> If you want to be sure you're changing only occurrences of multiple spaces,
> click the More button and check the box for "Use wildcards". Then use the search
> term
>
> [ ]{2,}
>
> (with a space between the brackets) and replace with a single space character.
>
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net