Bloomberg interview question

Given a string containing a mathematical expression, calculate the result