#1
|
|||
|
|||
Macro/Replace
Could someone please help.... I am trying to figure out how to remove "(cycle 1 of 1)" using wildcards. For instance "(cycle 1 of 12)" or (cycle 4 of 8)" I am close but it is removing all numbers in my document instead of just the words above in "". each of my documents are different so I am trying to use the wildcard instead. Thanks in advance! |
#2
|
||||
|
||||
For that you could use a wildcard Find/Replace, where:
Find = "\(cycle [0-9]{1,} of [0-9]{1,}\)" Replace = nothing
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you, I tried that but for some reason it is not working. I am not sure if it is case sensitive or space sensitive but the following is exactly how it shows on my word document. These numbers can go up to 25 on either side. I really appreciate your help
(Cycle 1 of 8) |
#4
|
||||
|
||||
It's certainly case-sensitive, as the only examples you gave were all in lower-case. It's also sensitive to the # of spaces in the text. As it appears you also have instances of 'Case', you could use a wildcard Find/Replace, where:
Find = "\([Cc]ycle [0-9]{1,} of [0-9]{1,}\)" Replace = nothing If the spacing is variable, further changes could be made.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
OMG, thank you so much! It worked and you just saved me a ton of time.
Thank you |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Find and Replace Macro | amparete13 | PowerPoint | 3 | 03-11-2014 05:29 AM |
Macro - replace with condition | ubns | Word VBA | 1 | 05-02-2012 12:52 AM |
macro or find/replace | JamesVenhaus | Word | 2 | 02-27-2012 03:34 PM |
Macro to Replace Fonts | ballj_35 | Word | 3 | 05-10-2011 01:10 AM |
Find and Replace Macro - A Better Way | Tribos | Word VBA | 0 | 10-08-2008 03:22 AM |