NameQ

NameQ["string"]
yields True if there are any symbols whose names match the string pattern given, and yields False otherwise.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Test whether a string corresponds to a Symbol:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Test whether there are any symbols corresponding to a class of strings:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Introduced in 1988
(1.0)