This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

NameQ

NameQ
yields True if there are any symbols whose names match the string pattern given, and yields False otherwise.
Test whether a string corresponds to a Symbol:
Test whether there are any symbols corresponding to a class of strings:
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]=
New in 1