Replacing

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
 
D

Doug Robbins - Word MVP

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
 
M

Marc Grant

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
 
G

Graham Mayor

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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