search/replace feature

M

Mason Pratt

I have a rather long document. The document has many reference which
contain one or two numbers, a colon and one or two numbers (i.e., "xx:xx").
I would like to remove all references using the search/replace feature. Is
there a wildcard command that will help me? Thanks
 
E

Eric Fletcher

Use the wildcard option of Find and Replace with
"([0-9]{1,2}):))([0-9]{1,2})" (no quotes) in the Find what box and nothing
in the Replace with box. You could leave out the parentheses sets but if you
did choose to leave them in, you could change the format if you wanted to:
for example, if you then used "\1-\3" (again, no quotes) in the Replace with
box, an instance like "23:5" would become "23-5". Check Word help for all
the details of the wildcard options, but essentially the above could be
interpreted as "any 1 or 2 digits followed by a colon and any 1 or 2
digits". By putting the sets within parentheses, you can refer to them in
the Replace with box by \n where "n" is the set number. (In my example,
"\3-\1" would cause "23:5" to become "5-23".)

The "Use wildcards" option is a very powerful, but often overlooked, feature
of Find and Replace.
 

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