regex that matches simple arithmetic expressions
Advertisements i have a solution, but the only problem is that for example "7=7=7" is matched and that should not be the case. ^[+-]?\d+([/*+-]\d+)*([/*+-]*=(?:[+-]?\d+([/*+-]\d+)*)+)*$ see below of what is matched and not these are matched and that is correct 456+5 0 0+0 5=0 1589+232 55+2 5+55 545454545 -12*53+1-2/5 +1+2+3=-5*2/3 000=0 18=+17/25 0-0 0*0 0/0 1/1… Read More regex that matches simple arithmetic expressions