Group:  Microsoft Word ยป microsoft.public.word.docmanagement
Thread: Limiting find to two words

Geek News

Limiting find to two words
froggfeathers 12/27/2008 6:13:01 PM
I need to find all occurrences of the word was followed by any word ending
with ing. When I find (was *ing) I get long blocks of text that don't help
me. Can I limit this search to only two words, the word was followed
directly by *ing?

Also, while I am at it, what is the code to find a word and replace it with
the same word so I can get a count of how many occurrences of a word I have
in a document.

Thanks in advance!
Re: Limiting find to two words
"JoAnn Paules" <jl_paules[ at ]hotnospammail.com> 12/27/2008 8:32:26 PM
Do you mean something like "dog walking:? If so, try looking for dog *ing.

There is no real code needed to count the number of times. Do a find and
replace with the word in both places. Replace all - it will tell you how
many times it "replaced" it.

--

JoAnn Paules
MVP Microsoft [Publisher]
Tech Editor for "Microsoft Publisher 2007 For Dummies"



"froggfeathers" <froggfeathers[ at ]discussions.microsoft.com> wrote in message
news:8030496E-DA47-4EDD-8213-DD8B4FA22C35[ at ]microsoft.com...
[Quoted Text]
>I need to find all occurrences of the word was followed by any word ending
> with ing. When I find (was *ing) I get long blocks of text that don't
> help
> me. Can I limit this search to only two words, the word was followed
> directly by *ing?
>
> Also, while I am at it, what is the code to find a word and replace it
> with
> the same word so I can get a count of how many occurrences of a word I
> have
> in a document.
>
> Thanks in advance!

Re: Limiting find to two words
"Klaus Linke" <info[ at ]fotosatz-kaufmann.de> 12/27/2008 9:05:05 PM
In Edit > Find, you can also check the box for "Match wildcards" and then
use
Find what: <[!^32][ at ]^32[!^32][ at ]ing>
Replace with: ^&
(and then click "Replace all").

The Find expression won't just match verbs though, but will also find "mean
something" and any other two words where the second ends with "ing"!

^32 is the code for a space. You could also type in a space instead.
[!^32][ at ] or [! ][ at ] matches a bunch of characters that are not spaces.
< matches the start of a word, > the end.

Regards,
Klaus


"JoAnn Paules" <jl_paules[ at ]hotnospammail.com> wrote:
[Quoted Text]
> Do you mean something like "dog walking:? If so, try looking for dog *ing.
>
> There is no real code needed to count the number of times. Do a find and
> replace with the word in both places. Replace all - it will tell you how
> many times it "replaced" it.
>
> --
>
> JoAnn Paules
> MVP Microsoft [Publisher]
> Tech Editor for "Microsoft Publisher 2007 For Dummies"
>
>
>
> "froggfeathers" <froggfeathers[ at ]discussions.microsoft.com> wrote in message
> news:8030496E-DA47-4EDD-8213-DD8B4FA22C35[ at ]microsoft.com...
>>I need to find all occurrences of the word was followed by any word ending
>> with ing. When I find (was *ing) I get long blocks of text that don't
>> help
>> me. Can I limit this search to only two words, the word was followed
>> directly by *ing?
>>
>> Also, while I am at it, what is the code to find a word and replace it
>> with
>> the same word so I can get a count of how many occurrences of a word I
>> have
>> in a document.
>>
>> Thanks in advance!
>

Re: Limiting find to two words
froggfeathers 12/30/2008 3:23:00 AM


"JoAnn Paules" wrote:

[Quoted Text]
> Do you mean something like "dog walking:? If so, try looking for dog *ing.

I am looking for was *ing. The problem is that it won't just pickup two
words. It will pick up a whole paragraph from the time it sees the word was
until (three sentences later) it finds an *ing word.

>
> There is no real code needed to count the number of times. Do a find and
> replace with the word in both places. Replace all - it will tell you how
> many times it "replaced" it.

If I do this, will word maintain the capitals and non-caps?

Thanks for the reply.

>
> --
>
> JoAnn Paules
> MVP Microsoft [Publisher]
> Tech Editor for "Microsoft Publisher 2007 For Dummies"
>
>
>
> "froggfeathers" <froggfeathers[ at ]discussions.microsoft.com> wrote in message
> news:8030496E-DA47-4EDD-8213-DD8B4FA22C35[ at ]microsoft.com...
> >I need to find all occurrences of the word was followed by any word ending
> > with ing. When I find (was *ing) I get long blocks of text that don't
> > help
> > me. Can I limit this search to only two words, the word was followed
> > directly by *ing?
> >
> > Also, while I am at it, what is the code to find a word and replace it
> > with
> > the same word so I can get a count of how many occurrences of a word I
> > have
> > in a document.
> >
> > Thanks in advance!
>
>
Re: Limiting find to two words
froggfeathers 12/30/2008 3:26:03 AM

I can work with that. I didn't think to put in the space. Thanks so much.

Frogg


"Klaus Linke" wrote:

[Quoted Text]
> In Edit > Find, you can also check the box for "Match wildcards" and then
> use
> Find what: <[!^32][ at ]^32[!^32][ at ]ing>
> Replace with: ^&
> (and then click "Replace all").
>
> The Find expression won't just match verbs though, but will also find "mean
> something" and any other two words where the second ends with "ing"!
>
> ^32 is the code for a space. You could also type in a space instead.
> [!^32][ at ] or [! ][ at ] matches a bunch of characters that are not spaces.
> < matches the start of a word, > the end.

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