Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
hello
i have a two-column table that has text in one column like "Candy - Apples", then numbers in the second column in the format "28-159a". What I want to do is do a find and replace such that all the numbers and dashes in the second column get deleted, leaving behind only the number after the dash. I can't do a generic wildcard search for *- because it would also delete the text and - in the first column. Any ideas? Thank you. Andrew |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
For a wildcard search, the expression [0-9] will match any single
digit, and the expression [0-9]{1,} will match any sequence of consecutive digits. So you could search for [0-9]{1,}- and leave the Replace With box empty. For completeness, I'll mention that you could use the *- search term if you select the second column (hover the mouse above the top of the column so it becomes a downward arrow, then click). After the replacement, Word will ask whether to search the rest of the document, and you answer No. But it's safer to use the more specific search term. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Sat, 12 May 2007 08:56:02 -0700, Andy wrote: hello i have a two-column table that has text in one column like "Candy - Apples", then numbers in the second column in the format "28-159a". What I want to do is do a find and replace such that all the numbers and dashes in the second column get deleted, leaving behind only the number after the dash. I can't do a generic wildcard search for *- because it would also delete the text and - in the first column. Any ideas? Thank you. Andrew |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using find and replace or wildcards to eliminate headers and such | Microsoft Word Help | |||
Search and replace with wildcards | New Users | |||
Word Bug: Find/Replace wildcards while track changes is turned on is buggy | Microsoft Word Help | |||
Find & Replace--Wildcards | Microsoft Word Help | |||
Find/Replace Wildcards | Microsoft Word Help |