For example, these are valid math expressions:
a * b + c -a * (b / 1.50) (apple + (-0.5)) * (boy - 1)
And these are invalid math expression
For parenthesis matching, and implementing other expression validation rules, it is probably easiest to write your own little parser. Regular expressions are no good in this kind of situation.