Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How do I use wildcards to search for ", [any word] and" ?
I need the wildcard string that would basically search for any single word
preceded by specific formatting and followed by a specific additional word. Specifically: I need to copyedit a 500 page manuscript where the author doesn't use the serial comma. (In other words, she writes "dogs, cats and mice" and we want "dogs, cats, and mice") I tried to search for ", * and" thinking that the "*" would yield any single word, but instead I'm still getting long strings of words. I also tried ", ?{2,9} and" but that yields similar results (a comma, followed by a long string of words and even more commas, and finally the "and") This is so frustrating because I know there must be a way to do this!!!! Furthermore, assuming there is a way to do this search, how would I then replace a comma after the "mystery word"? |
#2
|
|||
|
|||
I agree with your author as to the use of the comma here, however it would
be simpler to search for the 'and'. ie a wildcard search for and replace with , and You will have to step through the file to eliminate other 'ands' and you need to put a space after both 'ands' to avoid finding and as the part of a word. See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Sweeitebird wrote: I need the wildcard string that would basically search for any single word preceded by specific formatting and followed by a specific additional word. Specifically: I need to copyedit a 500 page manuscript where the author doesn't use the serial comma. (In other words, she writes "dogs, cats and mice" and we want "dogs, cats, and mice") I tried to search for ", * and" thinking that the "*" would yield any single word, but instead I'm still getting long strings of words. I also tried ", ?{2,9} and" but that yields similar results (a comma, followed by a long string of words and even more commas, and finally the "and") This is so frustrating because I know there must be a way to do this!!!! Furthermore, assuming there is a way to do this search, how would I then replace a comma after the "mystery word"? |
#3
|
|||
|
|||
Try:
Find: (, [a-z]@) (and) Replace with: \1, \2 -- Greg Maxey/Word MVP See: http://gregmaxey.mvps.org/word_tips.htm For some helpful tips using Word. Sweeitebird wrote: I need the wildcard string that would basically search for any single word preceded by specific formatting and followed by a specific additional word. Specifically: I need to copyedit a 500 page manuscript where the author doesn't use the serial comma. (In other words, she writes "dogs, cats and mice" and we want "dogs, cats, and mice") I tried to search for ", * and" thinking that the "*" would yield any single word, but instead I'm still getting long strings of words. I also tried ", ?{2,9} and" but that yields similar results (a comma, followed by a long string of words and even more commas, and finally the "and") This is so frustrating because I know there must be a way to do this!!!! Furthermore, assuming there is a way to do this search, how would I then replace a comma after the "mystery word"? |
#4
|
|||
|
|||
Side note, alternate approach:
FYI, I just noticed that in Tools | Options, Spelling and Grammar panel, if you click on Settings, "comma required before last list item" appears to be a setting you can tell Word to check for when you run the grammar check. On 5/15/05 2:48 AM, "Sweeitebird" wrote: I need the wildcard string that would basically search for any single word preceded by specific formatting and followed by a specific additional word. Specifically: I need to copyedit a 500 page manuscript where the author doesn't use the serial comma. (In other words, she writes "dogs, cats and mice" and we want "dogs, cats, and mice") I tried to search for ", * and" thinking that the "*" would yield any single word, but instead I'm still getting long strings of words. I also tried ", ?{2,9} and" but that yields similar results (a comma, followed by a long string of words and even more commas, and finally the "and") This is so frustrating because I know there must be a way to do this!!!! Furthermore, assuming there is a way to do this search, how would I then replace a comma after the "mystery word"? -- Daiya Mitchell, MVP Mac/Word Word FAQ: http://www.word.mvps.org/ MacWord Tips: http://www.word.mvps.org/MacWordNew/ What's an MVP? A volunteer! Read the FAQ: http://mvp.support.microsoft.com/ |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I search for a specific word in the file name? | Microsoft Word Help | |||
Search and Invisible Characters? | Microsoft Word Help | |||
howto search for a word in more than one *.doc (search in all doc's in a folder)? | Microsoft Word Help | |||
Problem with search feature in word 2002 | Microsoft Word Help | |||
Keyboard shortcut to repeat a search | Page Layout |