Group:  Microsoft Word » microsoft.public.word.docmanagement
Thread: Find/replace any first letter of a sentence after a single period

Geek News

Find/replace any first letter of a sentence after a single period
Rhonda from Western Australia 12/8/2008 9:19:01 AM
I have a long doc that several authors have worked on. Some use two spaces
after the period, some one. The corporate style is two (not my decision!), so
I'm trying to figure out an easy way of finding ALL instances of only one
space after a period and replacing it with two spaces. Sounds easy? Nope.

Problem is that each sentence following the space starts with a different
letter. I want to be able to find ".<space>[A-Z]" and replace with ".
<space><space>[A-Z]" where [A-Z] is any capital letter. The original letter
must be replaced with itself.

I can do this one letter at a time (e.g. ".<space>A" replace with
".<space><space>A" but as I know there will be many docs like this, I'd like
to know if there's a simple way to automate the process, either using
wildcards, special characters, or a macro.

Oh, and adding a minor complication to this - I don't want to do a 'Replace
All' as some legitimate periods are followed correctly by a single space (for
example, in the list of References, or after "i.e." or "e.g.").

Does anyone have any idea as to how I can achieve this? I'm happy to click
Replace for each instance found, but I really don't wan tto set up 26
different find/replace sequences to hit all letters of the alphabet.

Thanks!
RE: Find/replace any first letter of a sentence after a single period
Brian 12/8/2008 9:57:00 AM
Try Find period space space and replace with period space to get them all the
same, then find period space and replace with period space space.

You can then serach on i.spacespace e.space space and replace with i.e.space

Do the same for e.g.

Hope this makes sense.
--
Brian McCaffery


"Rhonda from Western Australia" wrote:

[Quoted Text]
> I have a long doc that several authors have worked on. Some use two spaces
> after the period, some one. The corporate style is two (not my decision!), so
> I'm trying to figure out an easy way of finding ALL instances of only one
> space after a period and replacing it with two spaces. Sounds easy? Nope.
>
> Problem is that each sentence following the space starts with a different
> letter. I want to be able to find ".<space>[A-Z]" and replace with ".
> <space><space>[A-Z]" where [A-Z] is any capital letter. The original letter
> must be replaced with itself.
>
> I can do this one letter at a time (e.g. ".<space>A" replace with
> ".<space><space>A" but as I know there will be many docs like this, I'd like
> to know if there's a simple way to automate the process, either using
> wildcards, special characters, or a macro.
>
> Oh, and adding a minor complication to this - I don't want to do a 'Replace
> All' as some legitimate periods are followed correctly by a single space (for
> example, in the list of References, or after "i.e." or "e.g.").
>
> Does anyone have any idea as to how I can achieve this? I'm happy to click
> Replace for each instance found, but I really don't wan tto set up 26
> different find/replace sequences to hit all letters of the alphabet.
>
> Thanks!
Re: Find/replace any first letter of a sentence after a single period
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 12/8/2008 11:30:35 AM
With the wildcard option set replace
(.) ([A-Z])
with
\1 \2

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
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



Rhonda from Western Australia wrote:
[Quoted Text]
> I have a long doc that several authors have worked on. Some use two
> spaces after the period, some one. The corporate style is two (not my
> decision!), so I'm trying to figure out an easy way of finding ALL
> instances of only one space after a period and replacing it with two
> spaces. Sounds easy? Nope.
>
> Problem is that each sentence following the space starts with a
> different letter. I want to be able to find ".<space>[A-Z]" and
> replace with ". <space><space>[A-Z]" where [A-Z] is any capital
> letter. The original letter must be replaced with itself.
>
> I can do this one letter at a time (e.g. ".<space>A" replace with
> ".<space><space>A" but as I know there will be many docs like this,
> I'd like to know if there's a simple way to automate the process,
> either using wildcards, special characters, or a macro.
>
> Oh, and adding a minor complication to this - I don't want to do a
> 'Replace All' as some legitimate periods are followed correctly by a
> single space (for example, in the list of References, or after "i.e."
> or "e.g.").
>
> Does anyone have any idea as to how I can achieve this? I'm happy to
> click Replace for each instance found, but I really don't wan tto set
> up 26 different find/replace sequences to hit all letters of the
> alphabet.
>
> Thanks!


RE: Find/replace any first letter of a sentence after a single per
Rhonda from Western Australia 12/8/2008 1:29:01 PM
It makes a lot of sense! I can recall doing something similar some years back
- I think my brain was foggy after dealing with this doc all day.

Thanks!

"Brian" wrote:

[Quoted Text]
> Try Find period space space and replace with period space to get them all the
> same, then find period space and replace with period space space.
>
> You can then serach on i.spacespace e.space space and replace with i.e.space
>
> Do the same for e.g.
>
> Hope this makes sense.
> --
> Brian McCaffery
>
>
> "Rhonda from Western Australia" wrote:
>
> > I have a long doc that several authors have worked on. Some use two spaces
> > after the period, some one. The corporate style is two (not my decision!), so
> > I'm trying to figure out an easy way of finding ALL instances of only one
> > space after a period and replacing it with two spaces. Sounds easy? Nope.
> >
> > Problem is that each sentence following the space starts with a different
> > letter. I want to be able to find ".<space>[A-Z]" and replace with ".
> > <space><space>[A-Z]" where [A-Z] is any capital letter. The original letter
> > must be replaced with itself.
> >
> > I can do this one letter at a time (e.g. ".<space>A" replace with
> > ".<space><space>A" but as I know there will be many docs like this, I'd like
> > to know if there's a simple way to automate the process, either using
> > wildcards, special characters, or a macro.
> >
> > Oh, and adding a minor complication to this - I don't want to do a 'Replace
> > All' as some legitimate periods are followed correctly by a single space (for
> > example, in the list of References, or after "i.e." or "e.g.").
> >
> > Does anyone have any idea as to how I can achieve this? I'm happy to click
> > Replace for each instance found, but I really don't wan tto set up 26
> > different find/replace sequences to hit all letters of the alphabet.
> >
> > Thanks!
Re: Find/replace any first letter of a sentence after a single per
Rhonda from Western Australia 12/8/2008 1:30:00 PM
That works a treat. It didn't at first, then I realised that there were two
spaces between \1 and \2.

Thank you!

"Graham Mayor" wrote:

[Quoted Text]
> With the wildcard option set replace
> (.) ([A-Z])
> with
> \1 \2
>
> 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
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
>
> Rhonda from Western Australia wrote:
> > I have a long doc that several authors have worked on. Some use two
> > spaces after the period, some one. The corporate style is two (not my
> > decision!), so I'm trying to figure out an easy way of finding ALL
> > instances of only one space after a period and replacing it with two
> > spaces. Sounds easy? Nope.
> >
> > Problem is that each sentence following the space starts with a
> > different letter. I want to be able to find ".<space>[A-Z]" and
> > replace with ". <space><space>[A-Z]" where [A-Z] is any capital
> > letter. The original letter must be replaced with itself.
> >
> > I can do this one letter at a time (e.g. ".<space>A" replace with
> > ".<space><space>A" but as I know there will be many docs like this,
> > I'd like to know if there's a simple way to automate the process,
> > either using wildcards, special characters, or a macro.
> >
> > Oh, and adding a minor complication to this - I don't want to do a
> > 'Replace All' as some legitimate periods are followed correctly by a
> > single space (for example, in the list of References, or after "i.e."
> > or "e.g.").
> >
> > Does anyone have any idea as to how I can achieve this? I'm happy to
> > click Replace for each instance found, but I really don't wan tto set
> > up 26 different find/replace sequences to hit all letters of the
> > alphabet.
> >
> > Thanks!
>
>
>
Re: Find/replace any first letter of a sentence after a single per
Thierry Fontenelle [MSFT] 12/8/2008 5:09:01 PM
Hello,

You can also customize your grammar checker to require 2 spaces between your
sentences:

Office Button | Word Options | Proofing | Writing Styles: Settings: Require
“Spaces between two sentences” = 2 (drop-down menu)

You will see green squiggly lines under punctuation marks followed by one
period only. The grammar checker will deal with e.g., i.e., which it knows
are not end-of-sentence markers.

I hope it helps,

Thierry

Thierry Fontenelle [MSFT]
Microsoft Natural Language Group


"Rhonda from Western Australia" wrote:

[Quoted Text]
> That works a treat. It didn't at first, then I realised that there were two
> spaces between \1 and \2.
>
> Thank you!
>
> "Graham Mayor" wrote:
>
> > With the wildcard option set replace
> > (.) ([A-Z])
> > with
> > \1 \2
> >
> > 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
> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >
> >
> >
> > Rhonda from Western Australia wrote:
> > > I have a long doc that several authors have worked on. Some use two
> > > spaces after the period, some one. The corporate style is two (not my
> > > decision!), so I'm trying to figure out an easy way of finding ALL
> > > instances of only one space after a period and replacing it with two
> > > spaces. Sounds easy? Nope.
> > >
> > > Problem is that each sentence following the space starts with a
> > > different letter. I want to be able to find ".<space>[A-Z]" and
> > > replace with ". <space><space>[A-Z]" where [A-Z] is any capital
> > > letter. The original letter must be replaced with itself.
> > >
> > > I can do this one letter at a time (e.g. ".<space>A" replace with
> > > ".<space><space>A" but as I know there will be many docs like this,
> > > I'd like to know if there's a simple way to automate the process,
> > > either using wildcards, special characters, or a macro.
> > >
> > > Oh, and adding a minor complication to this - I don't want to do a
> > > 'Replace All' as some legitimate periods are followed correctly by a
> > > single space (for example, in the list of References, or after "i.e."
> > > or "e.g.").
> > >
> > > Does anyone have any idea as to how I can achieve this? I'm happy to
> > > click Replace for each instance found, but I really don't wan tto set
> > > up 26 different find/replace sequences to hit all letters of the
> > > alphabet.
> > >
> > > Thanks!
> >
> >
> >

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net