If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Find and Replace with Wildcards
I've been trying to figure out how to use find and replace in Microsoft
Word XP with wild cards. I read through http://word.mvps.org/FAQs/General/UsingWildcards.htm and still wasn't able to figure it out. Here's what I want to do: I have a large text file. Here is an excerpt: -------- h21910-1919/h2 i20 films seen: 4 feature-length, 16 short/iol liBirth of a Nation, The (1915) liBroken Blossoms (1919) liImmigrant, The (1917) [short] liEasy Street (1917) [short] liRink, The (1916) [short] li(none yet) li(none yet) li(none yet) li(none yet) li(none yet)/ol bAlso Recommended: /bWinsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics (1911) [short]; Cameraman's Revenge, The (1912) [short]; Pool Sharks (1915) [short]; Tramp, The (1915) [short]; Champion, The (1915) [short]; Ask Father (1919) [short]; bMeh: /bLast Days of Pompeii, The (1913); Intolerance (1916); For His Son (1912) [short]; Aeroplane Flight and Wreck (Piloted by M. Cody) (1910) [short]; Girl and Her Trust, The (1912) [short]; Bangville Police (1913) [short]; By the Sea (1915) [short]; Butcher Boy, The (1917) [short]; Adventurer, The (1917) [short]; bGarbage: /b --------- What I want to do is fix it so that all instances of [movie title], [leading article] are switched to [leading article] [movie title]. I turned wildcards on and did a find and replace using the following values for starters: Find (without quotes): "; *; The" Replace (without quotes): "; The *" But, apparently * only works as a wildcard in find, and not replace (I ended up with "; The *"). Does anyone know how to use wild cards in find and replace correctly to accomplish what I like? Then I will adapt whatever you can tell me for use with other articles and positions of movie titles (for example, after li and /b instead of . THANKS TO ANYONE WHO CAN HELP!!!! |
#2
|
|||
|
|||
Find and Replace with Wildcards
I have rewritten the article for my own web site to try and make it
clearer - see http://www.gmayor.com/replace_using_wildcards.htm but there appears no simple way to do this as there is no unique string that can be easily be selected. * is rather a blunt weapon You replace wildcards by using brackets and slashed numbers eg The following will step through the text, but will find more than just the items you require so you will have to select next until the required string is found then replace it. (; )(*)[,] (The) \( Replace with \1\3 \2\4 ( I might have been able to tie it down even tighter had I had access to the original document, but this should get you started. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Luke Muehlhauser wrote: I've been trying to figure out how to use find and replace in Microsoft Word XP with wild cards. I read through http://word.mvps.org/FAQs/General/UsingWildcards.htm and still wasn't able to figure it out. Here's what I want to do: I have a large text file. Here is an excerpt: -------- h21910-1919/h2 i20 films seen: 4 feature-length, 16 short/iol liBirth of a Nation, The (1915) liBroken Blossoms (1919) liImmigrant, The (1917) [short] liEasy Street (1917) [short] liRink, The (1916) [short] li(none yet) li(none yet) li(none yet) li(none yet) li(none yet)/ol bAlso Recommended: /bWinsor McCay, the Famous Cartoonist of the N.Y. Herald and His Moving Comics (1911) [short]; Cameraman's Revenge, The (1912) [short]; Pool Sharks (1915) [short]; Tramp, The (1915) [short]; Champion, The (1915) [short]; Ask Father (1919) [short]; bMeh: /bLast Days of Pompeii, The (1913); Intolerance (1916); For His Son (1912) [short]; Aeroplane Flight and Wreck (Piloted by M. Cody) (1910) [short]; Girl and Her Trust, The (1912) [short]; Bangville Police (1913) [short]; By the Sea (1915) [short]; Butcher Boy, The (1917) [short]; Adventurer, The (1917) [short]; bGarbage: /b --------- What I want to do is fix it so that all instances of [movie title], [leading article] are switched to [leading article] [movie title]. I turned wildcards on and did a find and replace using the following values for starters: Find (without quotes): "; *; The" Replace (without quotes): "; The *" But, apparently * only works as a wildcard in find, and not replace (I ended up with "; The *"). Does anyone know how to use wild cards in find and replace correctly to accomplish what I like? Then I will adapt whatever you can tell me for use with other articles and positions of movie titles (for example, after li and /b instead of . THANKS TO ANYONE WHO CAN HELP!!!! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Find and Replace Wildcards | Matthew | New Users | 2 | June 9th, 2004 06:47 PM |
Find and Replace in Word 97 | Doug Robbins - Word MVP | General Discussion | 1 | May 28th, 2004 02:41 PM |
find all / replace all used in a selected range | oldguy | Worksheet Functions | 0 | February 26th, 2004 02:05 PM |
find all / replace all used in a selected range | Tom Turtle | Worksheet Functions | 0 | February 26th, 2004 11:11 AM |
Find #DIV/0! Error and Replace | Dave Peterson | Worksheet Functions | 5 | January 12th, 2004 07:18 PM |