You can use a regular expression:
String[] tokens = input.split("[+*/=-]");
Note: -
should be placed in first or last position to make sure it is not considered as a range separator.
You can use a regular expression:
String[] tokens = input.split("[+*/=-]");
Note: -
should be placed in first or last position to make sure it is not considered as a range separator.