public static String[] stringInArrays(String fields) {
String[] field = null;
if (fields != null && fields.length() > 0) {
field = fields.split(",");
String first = field[0];
field[0] = first.substring(first.indexOf("[") + 1);
String last = field[field.length - 1];
field[field.length - 1] = last.substring(0, last.indexOf("]"));
}
return field;
}