Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
larry larry is offline
external usenet poster
 
Posts: 79
Default Wildcard search want to replace only a portion of what is found

When using a wildcard search example: 19??~ it selects the full yr 1989~.

My question is i want to replace the 19 portion with nothing so that i have
the '89~' left.

When i replace with nothing in the above example....it will wipe out the
whole 1989~ area.

Is there a way just to wipe out the 19 only and leave the 89~ left...i have
a 5000 row text file that i need to do this on.
--
Larry
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Wildcard search want to replace only a portion of what is found

Taking you literally -- that you want to find only dates starting with 19 --
then in a wildcard replace you can search for

(19)(??~)

and replace it with

\2

which means the second item in parentheses in the search expression.

If you want to match all four-digit numbers, you would change the search
expression to

([0-9]{2})([0-9]{2}~)

and use the same replacement expression.

See http://www.gmayor.com/replace_using_wildcards.htm.

--
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.

Larry wrote:
When using a wildcard search example: 19??~ it selects the full yr
1989~.

My question is i want to replace the 19 portion with nothing so that
i have the '89~' left.

When i replace with nothing in the above example....it will wipe out
the whole 1989~ area.

Is there a way just to wipe out the 19 only and leave the 89~
left...i have a 5000 row text file that i need to do this on.



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
Wildcard search for *: Ben Bullock New Users 3 October 21st 07 11:36 PM
Wildcard search help. please? Ed Microsoft Word Help 2 September 11th 06 08:50 PM
Can I increment list via wildcard search/replace? Ed Microsoft Word Help 4 September 7th 06 02:56 PM
Help with wildcard search, please? Ed New Users 8 July 28th 06 11:18 AM
Help with Wildcard search/replace, please? Ed Microsoft Word Help 1 July 14th 06 12:48 AM


All times are GMT +1. The time now is 09:21 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"