Discussion:
Exclude numbers in parantheses using wildcard find and replace
(too old to reply)
prkhan56
2011-07-09 12:42:20 UTC
Permalink
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
Lisa Wilke-Thissen
2011-07-12 17:45:42 UTC
Permalink
Hi,

"prkhan56" wrote

[Word 2010]
Post by prkhan56
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.

--
Regards from Germany
Lisa [MS MVP Word]
prkhan56
2011-07-14 19:01:16 UTC
Permalink
Post by Lisa Wilke-Thissen
Hi,
[Word 2010]
Post by prkhan56
I wish to keep these numbers including the parantheses
and the hyphen sign and delete everything in the document.
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.
--
Regards from Germany
Lisa [MS MVP Word]
Thanks...works great

Loading...