What would be the simplest way to evaluate/simplify a mathematical string in VB?
For example: "k*k+(5+2*5)k+k"
would simplify to "k^2+15k+k"
and "5^2+3"
would evaluate to 28
.
To evaluate, I'm using NCalc by simply using the evaluate function, but it doesn't simplify expressions. What would be the simplest way of simplifying the equations?