Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 07-21-2014, 01:19 PM
catherineliang catherineliang is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Jul 2014
Posts: 1
catherineliang is on a distinguished road
Default Question about find and replace wild cards

I'm working on a bunch of strings of numbers. These strings contain three sets of numbers separated by a space, and I would like to replace only the third part of the strings. Example:

I want to replace
"01 01 0000" --> "01 01 .1"
"01 02 0000" --> "01 02 .1"

Is there a possible way I can use a wildcards to do this quickly? I have 2 thousand lines of numbers I need to replace!



Thanks,
Catherine
Reply With Quote
  #2  
Old 07-21-2014, 09:42 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,319
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You could do this with a wildcard Find/Replace, where:
Find = ([0][13579] [0-9]{2} )[0-9]{4}
Replace = \1.1
or, if the (01, 03, 05, etc) can continue on (e.g. 11, 13, 15, etc., up to 99):
Find = ([0-9][13579] [0-9]{2} )[0-9]{4}
Replace = \1.1
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
find, replace, wildcards
Please reply to this thread with any new information or opinions.

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find what box in Find and replace limits the length of a search term Hoxton118 Word VBA 7 06-10-2014 05:05 AM
Question and answer cards bobson Word 1 07-31-2013 10:28 AM
Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
Question about VBA Find and Replace BaPW Word VBA 1 08-20-2011 02:18 AM
Question about VBA Find and Replace BaPW Word 0 08-16-2011 11:55 AM


All times are GMT -7. The time now is 09:34 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft