No, that won’t work. If I split on ALL non-word characters, my mathematical operators vanish. I need to be able to keep the operators (characters in the class [±*/], and surrounded by whitespace).
I may end up pre-processing the string and converting the operators to words for the operations they represent. Then if I just split on non-word characters, everything is easy. But I also have to re-convert them back to the original characters at the end. So this seemed like a potentially better way.






















