View Single Post
  #2   Report Post  
Posted to microsoft.public.word.newusers
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Question about search and replace

Gilles Vanneste wrote:
I have a document that is utterly filled with data from person
addresses to phone numbers. Now all the phone numbers are formed like
this : xx.xx.xx, and I forgot to add the first three digits of those
numbers. I don't want to have to manually place them one by one, so I
looked a bit at the different functions I can use. My question is, I
noticed the search function has an option to search and replace
words. I want to replace all the phone numbers of the form xx.xx.xx
with the same three digits for every phone number in front of it
(xxx), so the end result is that all the phone numbers in my document
are like this (056)xx.xx.xx . How do I do I use the search and
replace function to accomplish this? I can't seem to find the right
way to do it.


Enter this expression in the Find What box (the code ^# finds any single
digit):

^#^#.^#^#.^#^#

and enter this expression in the Replace With box (the code ^& means "the
text that was found"):

(506)^&

Then click the Replace All button.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.