i have posted a previous question about Regular Expressions and this is another question it's not duplicate ... sorry for that
Hello I really need some help in Regular Expressions, i'm working on a function like
var x = 0;
function doMath(myVar){
RE = //; // here is the problem
if(RE.test(myVar))
eval(x+myVar)
else
return false;
}
i want the RE to match any math equation that could be added to that number like
EXAMPLE
+10+20+30 //accepted
**10 //rejected
-10- // rejected
10 // rejected
%10 //accepted
*(10+10)-10 //accepted
please help me
}