I'm trying to match a string pattern like this recursively or iteratively.
term :- can be any variable(string) or integer
expression :- term + expression or term * expression or term / expression or term - expression
The idea is to find a matching pattern for mathematical expression like this
ZING^30*sin(45)+46*LENGTH-20
Let's assume that the term is ready.
As usual, I'll start from a very bad one... in java.
[[term\\+]*[term\\*]*[term\\\]*[term\\-]*]+term