Find and Replace

  • Thread starter Thread starter Island Girl
  • Start date Start date
I

Island Girl

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.
 
IG,

This is one where you have to be very specific:

<[A-Z][a-z]{1,}> <[A-Z][a-z]{1,}>
 
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.
 
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.
 
Back
Top