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 (e-mail address removed) an email with your wish (best specifying
"Word" in the header), MS might be more likely to overhaul this feature.

Greetings,
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top