OR in wildcard search?

R

Razi Mohiuddin

I need to search for "fred" or "red". How do I do it?

It seems like f{0,1}red does not work - because 0
occurences are not permissible.

So is there another way to do this?

(fred)|(red) or something similar?

Selection.Find.ClearFormatting
With Selection.Find
.Text = "f{0,1}red"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
 
K

Klaus Linke

Hi Razi,

Both "Or" in wildcard matches, and the ability to search for "zero or more"
items should be implementable in principle, but aren't implemented in
Word's wildcard search.

If you drop [email protected] an email with your wish (best specifying
"Word" in the header), MS might be more likely to overhaul this feature.

Greetings,
Klaus
 
Top