Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Island Girl Island Girl is offline
external usenet poster
 
Posts: 192
Default Find and Replace

I was asked to delete all company names from a very, very long document and
replace with XXXX's.

Since all of the names were at least two words, I tried to find two or more
words in a row that start with capital letters, but nothing I tried worked.
It would find capitalized words but the "find" would stretch across two or
more sentences from one found word to the other. How do I find the words
side by side instead of far apart?

Greg Maxey set me straight on an earlier question regarding the beginnings
of words and I've been able to use it very nicely. Now I just need to carry
that a bit further and find two or more words in a row that start with caps.

I just love this stuff! And it's all thanks to this wonderful website.
  #2   Report Post  
Posted to microsoft.public.word.newusers
Greg Maxey[_2_] Greg Maxey[_2_] is offline
external usenet poster
 
Posts: 668
Default Find and Replace

IG,

This is one where you have to be very specific:

[A-Z][a-z]{1,} [A-Z][a-z]{1,}

Island Girl wrote:
I was asked to delete all company names from a very, very long
document and replace with XXXX's.

Since all of the names were at least two words, I tried to find two
or more words in a row that start with capital letters, but nothing I
tried worked. It would find capitalized words but the "find" would
stretch across two or more sentences from one found word to the
other. How do I find the words side by side instead of far apart?

Greg Maxey set me straight on an earlier question regarding the
beginnings of words and I've been able to use it very nicely. Now I
just need to carry that a bit further and find two or more words in a
row that start with caps.

I just love this stuff! And it's all thanks to this wonderful
website.


--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org



  #3   Report Post  
Posted to microsoft.public.word.newusers
Greg Maxey[_2_] Greg Maxey[_2_] is offline
external usenet poster
 
Posts: 668
Default Find and Replace

I just realized that you said two or more words. I don't know if that can
be done in one swoop or not. You might have to determine the longest name
(e.g., 4 words) set up the find for that, then reduce to 3, then finally run
the code I provided for 2.

Island Girl wrote:
I was asked to delete all company names from a very, very long
document and replace with XXXX's.

Since all of the names were at least two words, I tried to find two
or more words in a row that start with capital letters, but nothing I
tried worked. It would find capitalized words but the "find" would
stretch across two or more sentences from one found word to the
other. How do I find the words side by side instead of far apart?

Greg Maxey set me straight on an earlier question regarding the
beginnings of words and I've been able to use it very nicely. Now I
just need to carry that a bit further and find two or more words in a
row that start with caps.

I just love this stuff! And it's all thanks to this wonderful
website.


--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org



  #4   Report Post  
Posted to microsoft.public.word.newusers
Island Girl Island Girl is offline
external usenet poster
 
Posts: 192
Default Find and Replace

Hi, Greg:

Thanks again for your swift reply and wonderful help! You got me on the
right track with your last reply (re "but not") and helped me solve my latest
problem.

"Greg Maxey" wrote:

I just realized that you said two or more words. I don't know if that can
be done in one swoop or not. You might have to determine the longest name
(e.g., 4 words) set up the find for that, then reduce to 3, then finally run
the code I provided for 2.

Island Girl wrote:
I was asked to delete all company names from a very, very long
document and replace with XXXX's.

Since all of the names were at least two words, I tried to find two
or more words in a row that start with capital letters, but nothing I
tried worked. It would find capitalized words but the "find" would
stretch across two or more sentences from one found word to the
other. How do I find the words side by side instead of far apart?

Greg Maxey set me straight on an earlier question regarding the
beginnings of words and I've been able to use it very nicely. Now I
just need to carry that a bit further and find two or more words in a
row that start with caps.

I just love this stuff! And it's all thanks to this wonderful
website.


--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Find+Replace Dialog Box, Replace with Format problem Kathy Microsoft Word Help 3 February 1st 08 04:26 AM
Find multiple characters in one find using MSword find/replace Cliff Microsoft Word Help 2 October 29th 06 07:48 PM
Trying to replace words with fields using Find/Replace mbleyle Microsoft Word Help 2 March 29th 06 11:35 PM
Using find and replace or macros to replace page ranges JeremyC Microsoft Word Help 7 February 13th 06 09:20 PM
Find/ Replace is auto-capping the words I want to replace with Graham Mayor Microsoft Word Help 8 January 27th 06 01:39 AM


All times are GMT +1. The time now is 09:23 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"