Find and Replace

J

John R. Baker

I have a document with ONE space after each sentence. I would like to use
"Find and Replace" to change the single space to TWO spaces.

This is an easy problem for a human brain, but I'm not sure how to get
everything I want (and Not get what I DON'T want) with "Find and Replace".

Example BEFORE:
Sentence one. The second sentence. Here's the third. And finally the last.

Example AFTER:
Sentence one. The second sentence. Here's the third. And finally the
last.

Is there an easy way to do this? My document is over 60 pages long.

Thanks!

- John R. Baker
 
G

Graham Mayor

With the wildcard option set replace
([.\?\!])( )([! ])
with
\1\2\2\3

This will replace any single space after a period, question mark or
exclamation mark with a double space.
You should copy and paste the strings from here so you get the correct
number or spaces in the first string.

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

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

John R. Baker

Thank you for your reply.

My question was sent as a "New Post" and not a "Reply Group". I originally
thought the message got lost since I couldn't find it as a new thread. I'm
using Outlook Express, and this may be a bug in the way Outlook Express
handles messages, since it appears to me as a reply in a thread that was
started by "Island Girl" on 11/08/2004. Either that, or I don't fully
understand how newsgroups work. In any case, sorry for the repost, and
thanks again for your response.

- John R. Baker


Graham Mayor said:
With the wildcard option set replace
([.\?\!])( )([! ])
with
\1\2\2\3

This will replace any single space after a period, question mark or
exclamation mark with a double space.
You should copy and paste the strings from here so you get the correct
number or spaces in the first string.

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

My web site www.gmayor.com

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


I have a document with ONE space after each sentence. I would like
to use "Find and Replace" to change the single space to TWO spaces.

This is an easy problem for a human brain, but I'm not sure how to get
everything I want (and Not get what I DON'T want) with "Find and
Replace".

Example BEFORE:
Sentence one. The second sentence. Here's the third. And finally the
last.

Example AFTER:
Sentence one. The second sentence. Here's the third. And finally
the last.

Is there an easy way to do this? My document is over 60 pages long.

Thanks!

- John R. Baker
 
S

Steve Hayes

I have a document with ONE space after each sentence. I would like to use
"Find and Replace" to change the single space to TWO spaces.

This is an easy problem for a human brain, but I'm not sure how to get
everything I want (and Not get what I DON'T want) with "Find and Replace".

Example BEFORE:
Sentence one. The second sentence. Here's the third. And finally the last.

Example AFTER:
Sentence one. The second sentence. Here's the third. And finally the
last.

Is there an easy way to do this? My document is over 60 pages long.

I quite often do it the other way - look for two spaces and reduce them to
one.

I don't see why it shouldn't be possible to reverse the process.

In the Find box type . and press the space bar once.

In the replace box type . and press the space bar twice.

It might need an additional step, though:

In the Find box presa . and press the space bar three times.

In the replace box type . and press the space bar twice.
 
G

Greg Maxey

With 60 pages there is a good chance you might alread have a few double
spaces already inserted and a simple find .space and replace with
..spacespace may induce a few errors. Using a wildcard search you could find
..space([!space]) and replace with .spacespace\1

This would find any period, single space, and any adjacent character except
another period and replace with .spacespace(and that character).
 
G

Graham Mayor

It was either pilot error or the threading on the server went adrift
somewhere ;)

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

My web site www.gmayor.com

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


Thank you for your reply.

My question was sent as a "New Post" and not a "Reply Group". I
originally thought the message got lost since I couldn't find it as a
new thread. I'm using Outlook Express, and this may be a bug in the
way Outlook Express handles messages, since it appears to me as a
reply in a thread that was started by "Island Girl" on 11/08/2004.
Either that, or I don't fully understand how newsgroups work. In any
case, sorry for the repost, and thanks again for your response.

- John R. Baker


Graham Mayor said:
With the wildcard option set replace
([.\?\!])( )([! ])
with
\1\2\2\3

This will replace any single space after a period, question mark or
exclamation mark with a double space.
You should copy and paste the strings from here so you get the
correct number or spaces in the first string.

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

My web site www.gmayor.com

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


I have a document with ONE space after each sentence. I would like
to use "Find and Replace" to change the single space to TWO spaces.

This is an easy problem for a human brain, but I'm not sure how to
get everything I want (and Not get what I DON'T want) with "Find and
Replace".

Example BEFORE:
Sentence one. The second sentence. Here's the third. And finally the
last.

Example AFTER:
Sentence one. The second sentence. Here's the third. And finally
the last.

Is there an easy way to do this? My document is over 60 pages long.

Thanks!

- John R. Baker
 

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