help in math formula
Posted: Sun Jun 21, 2009 12:12 pm
Dear all.
I'm desigining fininial managment by using vb.net solution, my problem is that I need a regular expression to validate formulas like this one: L1_G1_I1 * (L1_G1_I2 + L1_G1_I4 ),
L means List
G means Group
I means Item
and each one of these with its number is a record in the database,
i have tried to make a regular expression but i have problems with brackets and with the math operators, and below is the regular expression that i made
^(((\w\d|\d\w)(_|\s)){3}(\+|\-|\*|\/)\s*){1,3}$ and it validate this L1_G1_I1 * L1_G1_I2 + L1_G1_I4 +
and what i want is adding brackets and i want the last math operator to be removed..
many thanx
I'm desigining fininial managment by using vb.net solution, my problem is that I need a regular expression to validate formulas like this one: L1_G1_I1 * (L1_G1_I2 + L1_G1_I4 ),
L means List
G means Group
I means Item
and each one of these with its number is a record in the database,
i have tried to make a regular expression but i have problems with brackets and with the math operators, and below is the regular expression that i made
^(((\w\d|\d\w)(_|\s)){3}(\+|\-|\*|\/)\s*){1,3}$ and it validate this L1_G1_I1 * L1_G1_I2 + L1_G1_I4 +
and what i want is adding brackets and i want the last math operator to be removed..
many thanx