"In a pattern, most characters match themselves, and only
themselves. The word hello is a perfectly valid pattern; it matches
the word hello, and nothing else. A pattern that matches only part
of a string is not considered to have matched that string. The word
hello does not match the text hello, world. For a pattern to match
a string, two things must be true:
"Every character in the pattern must match the string.
"Every character in the string must match the pattern.
"Now, if this were all there were to patterns, a pattern would
be another way of describing string comparison, and the rest of
this chapter would consist of filler text like "a ... consists of
sequences of nonblank characters separated by blanks," or possibly
some wonderful cookie recipes. Sadly, this is not so. Instead,
there are some characters in a pattern that have special meaning
and can match something other than themselves. Characters that have
special meaning in a pattern are called wildcards or
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.