NameQ

NameQ["string"]

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

Details and Options

Examples

open allclose all

Basic Examples  (2)

Test whether a string corresponds to a Symbol:

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

Options  (1)

ResolveContextAliases  (1)

NameQ resolves context aliases by default:

Use the ResolveContextAliases option to prevent alias resolution:

Only patterns that match the actual symbol name will give True with this option set to False:

Wolfram Research (1988), NameQ, Wolfram Language function, https://reference.wolfram.com/language/ref/NameQ.html (updated 2021).

Text

Wolfram Research (1988), NameQ, Wolfram Language function, https://reference.wolfram.com/language/ref/NameQ.html (updated 2021).

CMS

Wolfram Language. 1988. "NameQ." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/NameQ.html.

APA

Wolfram Language. (1988). NameQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NameQ.html

BibTeX

@misc{reference.wolfram_2023_nameq, author="Wolfram Research", title="{NameQ}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/NameQ.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_nameq, organization={Wolfram Research}, title={NameQ}, year={2021}, url={https://reference.wolfram.com/language/ref/NameQ.html}, note=[Accessed: 19-March-2024 ]}