How can I validate linear equations with regular expressions or is there another way besides using regular expressions. I will use ^ to denote an exponent.
2x + 3 = 8 //This should validate fine
3x + 2y + 4z = 12 //This should validate fine
4x^2 + 2y = 22 //This should not validate because of the power.
4xy + 3y = 45 //This should not validate because of the product of two unknowns.
2/x + 4y = 22 //This should not validate because of the unknown in the denominator
(3/4)x + 3y + 2z = 40 //This should validate fine.