NameQ

NameQ["string"]

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

Details

Examples

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]=

See Also

Names

Tutorials

Introduced in 1988
(1.0)