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 need to escape the -. I believe the quantifiers (+ and *) lose their special meaning, as do parentheses in a character class. If it doesn't work, try escaping those as well.
-
(+ and *)