I have this string for an instance:
"2 + 2 - 2"
and when evaluated it should return int(2)
;
I'm looking for a function/parser witch can determine if anykind of math content is matched within a string. More examples:
"(2 + 2) / 2"
"(4 / 8) * 12"
"128 * 8"
Do not need to evaluate and calculate these Math expressions, just need a function witch will determine (True/False
return values), if the statement is of this Math kind.
Is this possible with regex or something? Thanks!