How can I check syntax in a string which will contain basic mathematical operators +-/* and variables containing alphanumerical chars. This string also can contain brackets (). It is important to know if it's complete, meaning by closing brackets or no redudant operators.
For example
(1*3(3+2)+test)
is valid, but
((1++2)
is not.
Is this possible in Javascript using regex? Or do I have to make an algorithm, if so, has someone a similar algorithm for that?