Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Bert Coules Bert Coules is offline
external usenet poster
 
Posts: 123
Default Another Find-and-Replace question. Help appreciated

I have a document in Courier New in which some sentences are separated by
two spaces after the full stop and some by one.

I want to reformat it so that *all* full stops are followed by two spaces,
but I can't work out how to do it. I can't simply search for "full stop +
space" and replace with "full stop + two spaces" because the sentences that
are already separated by two spaces will end up with three.

Is there a wild character which represents "a character but not a space"?

The only other way I've thought of is to replace both "full stop + space"
and "full stop + two spaces" with just "full stop", and then replace "full
stop" with "full stop + two spaces". This strikes me as clumsy and
inelegant, but I suppose it should work. But surely there's a better way?

Many thanks.

Bert







  #2   Report Post  
Posted to microsoft.public.word.newusers
Reitanos Reitanos is offline
external usenet poster
 
Posts: 109
Default Another Find-and-Replace question. Help appreciated

There's probably a smarter way, but why not replace ". " (period
single) with ". " (period double) and then replace all " " (triple)
with " " (double) twice.
Don't forget question and exclamation marks as well.

On Oct 22, 3:15*pm, "Bert Coules" wrote:
I have a document in Courier New in which some sentences are separated by
two spaces after the full stop and some by one.

I want to reformat it so that *all* full stops are followed by two spaces,
but I can't work out how to do it. *I can't simply search for "full stop +
space" and replace with "full stop + two spaces" because the sentences that
are already separated by two spaces will end up with three.

Is there a wild character which represents "a character but not a space"?

The only other way I've thought of is to replace both "full stop + space"
and "full stop + two spaces" with just "full stop", and then replace "full
stop" with "full stop + two spaces". *This strikes me as clumsy and
inelegant, but I suppose it should work. *But surely there's a better way?

Many thanks.

Bert


  #3   Report Post  
Posted to microsoft.public.word.newusers
Bert Coules Bert Coules is offline
external usenet poster
 
Posts: 123
Default Another Find-and-Replace question. Help appreciated

Reitanos wrote:

There's probably a smarter way, but why not replace ". " (period
single) with ". " (period double) and then replace all " " (triple)
with " " (double) twice.


Thanks for that. It does seem more elegant than my suggestion.

Don't forget question and exclamation marks as well.


I had! Thanks.

Bert


  #4   Report Post  
Posted to microsoft.public.word.newusers
TedMi TedMi is offline
external usenet poster
 
Posts: 155
Default Another Find-and-Replace question. Help appreciated

^w will match any number of consecutive spaces and/or tabs.
So replace .^w with . space space; repeat for !, ?
--
TedMi

"Bert Coules" wrote:

I have a document in Courier New in which some sentences are separated by
two spaces after the full stop and some by one.

I want to reformat it so that *all* full stops are followed by two spaces,
but I can't work out how to do it. I can't simply search for "full stop +
space" and replace with "full stop + two spaces" because the sentences that
are already separated by two spaces will end up with three.

Is there a wild character which represents "a character but not a space"?

The only other way I've thought of is to replace both "full stop + space"
and "full stop + two spaces" with just "full stop", and then replace "full
stop" with "full stop + two spaces". This strikes me as clumsy and
inelegant, but I suppose it should work. But surely there's a better way?

Many thanks.

Bert








  #5   Report Post  
Posted to microsoft.public.word.newusers
Bert Coules Bert Coules is offline
external usenet poster
 
Posts: 123
Default Another Find-and-Replace question. Help appreciated

TedMi wrote:

^w will match any number of consecutive spaces and/or tabs.


That's very useful, thanks.

Bert




  #6   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Another Find-and-Replace question. Help appreciated

You could also use a wildcard search for

([.:\?\!])([ ]){1,}
replace with
\1\2\2

which should do the lot at once. However you would have to handle the
behaviour where quotes are involved separately.
See http://www.gmayor.com/replace_using_wildcards.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Bert Coules wrote:
TedMi wrote:

^w will match any number of consecutive spaces and/or tabs.


That's very useful, thanks.

Bert



  #7   Report Post  
Posted to microsoft.public.word.newusers
Bert Coules Bert Coules is offline
external usenet poster
 
Posts: 123
Default Another Find-and-Replace question. Help appreciated

Graham,

Thanks for that, and for the link. In this particular instance I've now
achieved what I needed by inelegant (but successful) means, but it's bound
to crop up again.

Bert


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and replace question jezzica85 Microsoft Word Help 2 June 21st 07 04:51 AM
Find & Replace Question Siuan New Users 2 August 12th 06 08:59 PM
Find & Replace Question Fuzzhead Microsoft Word Help 4 May 6th 06 12:07 AM
Find and Replace question z3365 Microsoft Word Help 4 February 22nd 06 11:09 PM
--A Find & Replace Question-- KlikThis Microsoft Word Help 3 January 1st 05 05:58 PM


All times are GMT +1. The time now is 07:17 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"