Reply
 
Thread Tools Display Modes
  #1   Report Post  
Sweeitebird
 
Posts: n/a
Default 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   Report Post  
Graham Mayor
 
Posts: n/a
Default

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   Report Post  
Greg Maxey
 
Posts: n/a
Default

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   Report Post  
Daiya Mitchell
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I search for a specific word in the file name? Trlamamemi Microsoft Word Help 2 May 8th 05 04:03 PM
Search and Invisible Characters? Joseph McGuire Microsoft Word Help 3 March 4th 05 05:06 AM
howto search for a word in more than one *.doc (search in all doc's in a folder)? erik Microsoft Word Help 2 February 11th 05 03:02 PM
Problem with search feature in word 2002 Ellen Microsoft Word Help 0 February 8th 05 09:31 PM
Keyboard shortcut to repeat a search Bob Day Page Layout 1 January 12th 05 03:05 AM


All times are GMT +1. The time now is 08:49 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"