public int [] stringToIntArray(String arr){
   	String[] items = arr.replaceAll("\\[", "").replaceAll("\\]", "").split(",");

   	int[] results = new int[items.length];

   	for (int i = 0; i < items.length; i++) {
   	    try {
   	        results[i] = Integer.parseInt(items[i]);
   	    } catch (NumberFormatException nfe) {};
   	}
   	return results;
   }