1text = et.getText().toString();
2if (text == null || text.length() < 3 || text.length > 8) {
3 tv.setText("Invalid length, should be from 3 to 8 characters. Please check your code");
4} else {
5 a = text.substring(0,1);
6 b = text.substring(1,2);
7
8 c = text.substring(3,4);
9 if (text.length() > 3) {
10 d = text.substring(4);
11 } else {
12 d = null;
13 }
14}
15