How can I split these simple mathematical expressions into seperate strings?
I know that I basically want to use the regular expression: \"[0-9]+|[*+-^()]\"
\"[0-9]+|[*+-^()]\"
You only put the delimiters in the split statement. Also, the - mean range and has to be escaped.
-
"578+223-5^2".split("[*+\\-^()]")