#1
|
|||
|
|||
Wildcard search once worked, now does not
I need to take a list of phrases with parentheticals next to them and swap their order so that the parenthetical is first, the phrase second, and while stripping the parentheses (and other similar punctuation). I've developed the following find/replace string that I SWEAR I've successfully used multiple times in the past but which is now no longer working. Instead of swapping the first found string and moving to the next one, which is on the following line, the search increments on that first line by just a single character in the first string, then continues swapping, which ain't right.
I ran a macro to reset the wildcard search, restarted Word, to no avail. Is my memory going, or did I fat-finger the find/replace strings? Here they are, plus a short sample of the text I'm working with: Find: (*)( )([\(\[])(*)([\)\];])(^13) Replace: \4^t\1\6 Sample list: Endangered Species Act (ESA) linear feet (lf) Federal Emergency Management Agency (FEMA; river miles [RM] North American Vertical Datum of 1988 [NAVD88] right-of-way (ROW) To be clear, the first find is: Endangered Species Act (ESA)[paragraph mark] The first replace is: ESA[tab]Endangered Species Act the second find should be linear feet (lf) but it's not; it's this: SA[tab]Endangered Species Act[paragraph mark] linear feet (lf)[paragraph mark] |
#2
|
||||
|
||||
Your wildcard Find/Replace works just fine for me, though it could be simplified to:
Find = (*) [\(\[](*)[\)\];]^13 Replace = \2^t\1^p Are you sure you don't have 'Tracked Changes' on?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks for trying it out, and for the streamlining -- don't know why, but I just assumed that every substring needed to be in parens.
I tried running it again this morning after restarting my computer, and it still doesn't work. Had a coworker try it and, as with you, it worked fine for them, so it looks like I'm going to need to repair Office. Track changes is off on my machine; there's nothing hidden,etc. EDIT: I had to re-install Office to fix the problem... |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Having problems with a Wildcard search | Cosmo | Word VBA | 9 | 02-12-2016 08:03 PM |
Issue with wildcard search | mysterytramp | Word | 0 | 05-13-2015 10:40 AM |
Where is the error in my wildcard search? | Ulodesk | Word | 10 | 06-30-2014 01:46 PM |
Tricky wildcard search | NobodysPerfect | Word | 10 | 03-19-2014 04:29 AM |
Wildcard search help. | Kempston | Word | 0 | 11-13-2009 03:58 AM |