This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Programming / String Manipulation  /
SyntaxQ

  • SyntaxQ[" string "] returns True if the string corresponds to syntactically correct input for a single Mathematica expression, and returns False otherwise.
  • If SyntaxQ returns False, you can find the position of a syntax error using SyntaxLength.
  • See the Mathematica book: Section 2.8.13.
  • See also: ToExpression, $SyntaxHandler, DelimiterFlashTime.