Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Andy Andy is offline
external usenet poster
 
Posts: 90
Default find and replace numbers using wildcards

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   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default find and replace numbers using wildcards

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using find and replace or wildcards to eliminate headers and such Joe Microsoft Word Help 3 April 26th 07 03:38 PM
Search and replace with wildcards Ben K. Bullock New Users 9 March 16th 06 11:54 AM
Word Bug: Find/Replace wildcards while track changes is turned on is buggy [email protected] Microsoft Word Help 2 February 24th 06 09:35 AM
Find & Replace--Wildcards Joe McGuire Microsoft Word Help 6 February 16th 06 09:16 AM
Find/Replace Wildcards DeanH Microsoft Word Help 2 August 11th 05 09:44 AM


All times are GMT +1. The time now is 12:46 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"