find and replace

B

bhutchinson

I need to find and replace 2200 occurences of variable text in a word document.
I have tried all the wild card option on the edit find and replace function
and need some help.

an example of what i need is: Home Phone: 5135551212. I need to delete the
entire line of text 2200 times. The phone number is different in each
occurence.
 
G

Greg Maxey

Assuming the number ends the line, you could try using wildcards:

Find:

Home Phone: [0-9]{10}^13

Replace with nothing.

If the last line of the document is a match it may not be detected
 
P

Pesach Shelnitz

Hi,

You don't need to start up with wildcards to do this. Enter the following
search string in Find.

Home Phone: ^#^#^#^#^#^#^#^#^#^#.^p

Leave Replace empty.
Click Replace All.

This will work only if there is exactly one space between the colon and the
phone number and there are no extra spaces at the end of the line before the
carriage return.
 
G

Graham Mayor

While the two suggestions made will find phone numbers in the format you
have named,
Home Phone:[0-9\-\(\) ]{10,}^13
will find the phone numbers in any format e.g.
Home Phone: 5135551212
Home Phone: 513-5551212
Home Phone: (513) 5551212
Home Phone: 513 5551212

http://www.gmayor.com/replace_using_wildcards.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
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