Hi

Im supposed to make a molecular weight calculator program for school.

The user inputs a formula for example: Ca(OH)2.
Then the program calculates the weight and displays it

Ca(OH)2 -> 74.09

I need some help with parsing the formula.