Wild Cards in Find and Replace to put two spaces after periods

N

NMcAloon

Someone told me to use the following in Find and Replace in order to get two
spaces after periods and colons, where the succeeding character is a capital
letter.
Find: ([.:]) ([A-Z])
Replace: \1 \2

This is so not working for me. Any suggestions or any correction to the
method above? Thanks!
 
H

Helmut Weber

Hi,
Find: ([.:]) ([A-Z])
Replace: \1 \2

there is only one space in your find expression.
Should be two:
Find: ([.:]) ([A-Z])

Maybe still better:
([.:]) {2,}([A-Z])

which means period or colon followed
by two or more spaces.

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP
 
G

Graham Mayor

NMcAloon said:
Someone told me to use the following in Find and Replace in order to
get two spaces after periods and colons, where the succeeding
character is a capital letter.
Find: ([.:]) ([A-Z])
Replace: \1 \2

This is so not working for me. Any suggestions or any correction to
the method above? Thanks!

It doesn't work because the replace string puts back the found string
exactly as it was before.

If you want to remove two spaces and replace with one add an extra space in
the search string
([.:]) ([A-Z])
and leave the replace string

or if you want to add an extra space leave the search string and put the
extra space in the replace string
\1 \2

http://www.gmayor.com/replace_using_wildcards.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
N

NMcAloon

thank you, thank you and thank you!

Graham Mayor said:
NMcAloon said:
Someone told me to use the following in Find and Replace in order to
get two spaces after periods and colons, where the succeeding
character is a capital letter.
Find: ([.:]) ([A-Z])
Replace: \1 \2

This is so not working for me. Any suggestions or any correction to
the method above? Thanks!

It doesn't work because the replace string puts back the found string
exactly as it was before.

If you want to remove two spaces and replace with one add an extra space in
the search string
([.:]) ([A-Z])
and leave the replace string

or if you want to add an extra space leave the search string and put the
extra space in the replace string
\1 \2

http://www.gmayor.com/replace_using_wildcards.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
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