Exclude numbers in parantheses using wildcard find and replace

P

prkhan56

Hello All,
I am using Word 2010 and have a long document where there are numbers
in parantheses.
I wish to keep these numbers including the parantheses and the hyphen
sign and delete everything in the document.

eg.(1-1),(1-2)............(1-10).......many more like these with
different combinations.

At present I have only single digit on the left side of the hyphen.

I tried the following using wildcard find and replace but it says Word
found no items matching this criteria.

(\([!0-9]{1,}\-[!0-9]{1,}\))

So after the find and replace I should have only numbers in
parantheses with hyphens...all other text/digits should be deleted.

Any help please
Thanks in advance
Rashid Khan
 
L

Lisa Wilke-Thissen

Hi,

"prkhan56" wrote

[Word 2010]
I wish to keep these numbers including the parantheses
and the hyphen sign and delete everything in the document.

maybe, this could be an alternative:

1. Ctrl+H | Find | Use wildcards
2. Find what: \([0-9]{1,}-[0-9]{1,}\)
3. Find in: Main document

Now all instances are selected. You can copy them (Ctrl+C) and paste
them into another document.
 
P

prkhan56

Hi,

"prkhan56"  wrote

[Word 2010]
I wish to keep these numbers including the parantheses
and the hyphen sign and delete everything in the document.

maybe, this could be an alternative:

1.  Ctrl+H | Find | Use wildcards
2. Find what: \([0-9]{1,}-[0-9]{1,}\)
3. Find in: Main document

Now all instances are selected. You can copy them (Ctrl+C) and paste
them into another document.

Thanks...works great
 

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