public class Test {
/**
* @param args
*/
public static void main(String[] args) {
String reg = "##12";
System.out.println("++" + reg);
String[] s = reg.split("#{1,}");
System.out.println(s.length);
for (int a = 0; a < s.length; a++) {
System.out.println(s[a]);
}
String reg1 = "12";
System.out.println("++" + reg1);
String[] s1 = reg1.split("#{1,}");
System.out.println(s1.length);
for (int a = 0; a < s1.length; a++) {
System.out.println(s1[a]);
}
String reg2 = "##";
System.out.println("++" + reg2);
String[] s2 = reg2.split("#{1,}");
System.out.println(s2.length);
for (int a = 0; a < s2.length; a++) {
System.out.println(s2[a]);
}
}
}