Search and replace in MS Word.

J

Jen Chiers

I got a document in MS word with a lot of phone numbers in it. The notation
of the numbers is like this: xx.xx.xx . But in Belgium, we have to put an
area number in front of it. The number I have to put in front of it is (056)
brackets included. How can we fix this with the search and replace function
in MS Word? Because I don't want to put (056) in front of every number one
by one.

Thanks in advance!
 
R

Robert M. Franz (RMF)

Hello Jen

Jen said:
I got a document in MS word with a lot of phone numbers in it. The notation
of the numbers is like this: xx.xx.xx . But in Belgium, we have to put an
area number in front of it. The number I have to put in front of it is (056)
brackets included. How can we fix this with the search and replace function
in MS Word? Because I don't want to put (056) in front of every number one
by one.

Edit | Replace is your friend. Activate "Use wildcards" in the search
options.

Find what: ([0-9][0-9].[0-9][0-9].[0-9][0-9])

Replace with: (056) \1

I'm sure somebody more fluent with Word's RegEx could simplify the
search term a bit (I'm not good with repetitions :)), but this shoudl
do it.

HTH
Robert
 
G

Graham Mayor

Even simpler, search for

([0-9.]{8})

but whichever you use, watch out for dates in the format 06.09.07

See http://www.gmayor.com/replace_using_wildcards.htm

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Hello Jen

Jen said:
I got a document in MS word with a lot of phone numbers in it. The
notation of the numbers is like this: xx.xx.xx . But in Belgium, we
have to put an area number in front of it. The number I have to put
in front of it is (056) brackets included. How can we fix this with
the search and replace function in MS Word? Because I don't want to
put (056) in front of every number one by one.

Edit | Replace is your friend. Activate "Use wildcards" in the search
options.

Find what: ([0-9][0-9].[0-9][0-9].[0-9][0-9])

Replace with: (056) \1

I'm sure somebody more fluent with Word's RegEx could simplify the
search term a bit (I'm not good with repetitions :)), but this shoudl
do it.

HTH
Robert
 

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