Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.newusers
|
|||
|
|||
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
Posted to microsoft.public.word.newusers
|
|||
|
|||
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
Posted to microsoft.public.word.newusers
|
|||
|
|||
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
Posted to microsoft.public.word.newusers
|
|||
|
|||
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
Posted to microsoft.public.word.newusers
|
|||
|
|||
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
Posted to microsoft.public.word.newusers
|
|||
|
|||
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
Posted to microsoft.public.word.newusers
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and replace question | Microsoft Word Help | |||
Find & Replace Question | New Users | |||
Find & Replace Question | Microsoft Word Help | |||
Find and Replace question | Microsoft Word Help | |||
--A Find & Replace Question-- | Microsoft Word Help |