Home

nonwildcard

Nonwildcard is a term used in computing to describe the literal characters in a search or matching pattern that are not treated as wildcards. Wildcards are special symbols that can stand for one or more unspecified characters, while nonwildcards must match exactly. The distinction helps users understand which parts of a pattern are fixed and which parts can vary.

In glob patterns used for filesystem matching, nonwildcards are the characters that must appear as written.

In SQL, pattern matching with LIKE uses wildcards such as underscores and percent signs. Nonwildcards are the

In regular expressions, most characters are literals unless they have special meaning. Nonwildcards correspond to literal

Understanding nonwildcards aids in precise matching, proper escaping, and potential performance gains by leveraging exact character

For
example,
in
the
pattern
data_2023*.txt,
the
segments
data_2023
and
.txt
are
nonwildcards,
while
the
asterisk
(*)
is
a
wildcard
that
can
match
any
sequence
of
characters.
To
search
for
a
literal
asterisk,
it
must
be
escaped
(for
example
data_2023\*.txt),
in
which
case
the
asterisk
is
treated
as
a
nonwildcard.
other
characters
in
the
pattern.
For
instance,
in
the
pattern
'A__B%.csv',
A
and
B
and
the
period
are
nonwildcards,
while
the
underscores
and
the
percent
sign
are
wildcards.
To
search
for
a
literal
underscore
or
percent
sign,
an
escape
mechanism
is
used
(ESCAPE
clause
or
appropriate
escape
character).
characters
in
the
pattern,
whereas
metacharacters
such
as
.
*
+
?
(
)
[
{
|
^
$
have
wildcard-like
effects
and
can
be
made
literal
by
escaping.
matches
when
possible.