Replacing

  • Thread starter Thread starter Marc Grant
  • Start date Start date
M

Marc Grant

Is there anyway of replacing certain parts of words using a wildcard for
example how do I change all words in a list beginning with m and ending in t
to begin with n and end with s leaving all other letters the same?

Thanks
 
In the Edit>Replace dialog, click on the More button and check the "Use
wildcards" box and then in the Find what control, enter

(<m)(*)(t>)

and in the Replace with Control, enter

n\2s

Then click on Replace all.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
Doug

It works brilliantly - thanks for that. Can this be used to replace tabs in
the same way i.e. ^tMichael^t to change to Michael where Michael would be the
name that changes
 
You don't really need the brackets around <m and t>
<m(*)t> replace with n\1s would work just as well.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
Back
Top