Replace period and single space with period and two spaces in MS W

D

Dougmeister

I have this that works so far for "Find":

[\.][\ ][A-Z]

but I can't figure out the "Replace" part. Something to do with $1$2, maybe
a "\ " (without the quotes). Dunno.

There is a document that I am editing that has a lot of bad grammar. Many
sentences only have one (1) space between the preceding period and the
beginning of the next sentence.

Also, it should not put two spaces at the end of a paragraph.

Extra credit:

Also trying to replace a specific word with the same word, yet in bold.

Thanks.
 
M

macropod

Hi Dougmeister,

Find= (. )([A-Z])
Replace= \1 \2
with Wildcards on

As for the bolding-
Find= Text to find
Replace= ^&
and, with the replacement input box active, select the bold attribute via Format|Font
 
G

Greg Maxey

See:
http://gregmaxey.mvps.org/Two_Spaces_After_Sentences.htm
Hi Dougmeister,

Find= (. )([A-Z])
Replace= \1 \2
with Wildcards on

As for the bolding-
Find= Text to find
Replace= ^&
and, with the replacement input box active, select the bold attribute
via Format|Font
Dougmeister said:
I have this that works so far for "Find":

[\.][\ ][A-Z]

but I can't figure out the "Replace" part. Something to do with
$1$2, maybe a "\ " (without the quotes). Dunno.

There is a document that I am editing that has a lot of bad grammar.
Many sentences only have one (1) space between the preceding period
and the beginning of the next sentence.

Also, it should not put two spaces at the end of a paragraph.

Extra credit:

Also trying to replace a specific word with the same word, yet in
bold. Thanks.
 
A

AMR

I don't know if you can do all the functions you want in one Find/Replace
string, but you can do them in 3.

To find and replace one space after a period needs 2 passes:

FIRST PASS
Find what:
.. [A-Z]
(use wildcards)

Replace with:
.. |^&

SECOND PASS
Find what:
|.
(that's pipe period space)

Replace with:

(nothing)

I used a pipe (|) character as a distinctive marker to find. You can use
whatever character you want as long as it is not present in the text of the
document.

To clean up any spaces at the end of a paragraph:

Find what:
^p
(that's a space before the paragraph marker)

Replace with:
^p
(no extra spaces)


To replace a word with same text but bold:

Find what:
text
(whatever the word is you want to bold)

Replace with:

(nothing - set the format to bold. Format> Font> Bold)
 
G

Graham Mayor

Dougmeister said:
There is a document that I am editing that has a lot of bad grammar.
Many sentences only have one (1) space between the preceding period
and the beginning of the next sentence.

This is not grammatically incorrect, nor is it typographically incorrect.
Two spaces between sentences is a throwback to the days of the mechanical
typewriter. It is completely unnecessary with word processors and
proportionally spaced fonts.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
D

Dougmeister

Thanks!

macropod said:
Hi Dougmeister,

Find= (. )([A-Z])
Replace= \1 \2
with Wildcards on

As for the bolding-
Find= Text to find
Replace= ^&
and, with the replacement input box active, select the bold attribute via Format|Font
--
Cheers
macropod
[Microsoft MVP - Word]


Dougmeister said:
I have this that works so far for "Find":

[\.][\ ][A-Z]

but I can't figure out the "Replace" part. Something to do with $1$2, maybe
a "\ " (without the quotes). Dunno.

There is a document that I am editing that has a lot of bad grammar. Many
sentences only have one (1) space between the preceding period and the
beginning of the next sentence.

Also, it should not put two spaces at the end of a paragraph.

Extra credit:

Also trying to replace a specific word with the same word, yet in bold.

Thanks.
.
 
D

Dougmeister

Thanks. I did not know this.

Graham Mayor said:
This is not grammatically incorrect, nor is it typographically incorrect.
Two spaces between sentences is a throwback to the days of the mechanical
typewriter. It is completely unnecessary with word processors and
proportionally spaced fonts.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top