public class Main { public static void main(String[] arguments) { String input = "12%12%%12"; String[] piece = input.split("[-/%]"); for (int j = 0; j < piece.length; j++) System.out.println(piece[j] + "\t"); } }