Find and Replace

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

Greg Maxey

IG,

This is one where you have to be very specific:

<[A-Z][a-z]{1,}> <[A-Z][a-z]{1,}>
 
G

Greg Maxey

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

Island Girl

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.
 

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