Meta interview question

Validity of an expression string