Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wildcard search for *: | New Users | |||
Wildcard search help. please? | Microsoft Word Help | |||
Can I increment list via wildcard search/replace? | Microsoft Word Help | |||
Help with wildcard search, please? | New Users | |||
Help with Wildcard search/replace, please? | Microsoft Word Help |