Non-breaking space before middle name

G

Guest

Is there a way in ONE pass of Find and Replace to insert a non-breaking space befor
any occurrence of a middle name OR middle initial

For example
Want John [space] Doe [space] Smith to become John [non-breaking space] Doe [space] Smit
And John [space] D. [space] Smith to become John [non-breaking space] D. [space] Smit

While leaving John [space] Smith as John [space] Smit

I've been able to do this in two passes of Find and Replace but not one pass. Trying to do thi
without using a macro. Any ideas

Thanks in advance
Neal
 
J

Jay Freedman

Hi, Neal,

You need to do a wildcard search/replace (see
http://word.mvps.org/FAQs/General/UsingWildcards.htm) with the following
entries:

Find What: ([A-Z][a-z.]{1,}) ([A-Z][a-z.]{1,} [A-Z][a-z]{1,})
Replace With: \1^s\2

This may still get confused by constructions such as a sentence that begins
with "Concerning John Doe" because it can't tell the difference between a
proper name and the first (i.e., capitalized) word of a sentence. Similarly,
it will have trouble with double middle initials, such as "John F. X. Doe",
or hyphenated first or middle names.
 

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