private static posCounter errorPosition(String mm){
            int i = 0;  //iterator for loop
            int pi = 0; //positions index number
            int in = 0; //boolean for values inside pre array
            int con = 0;//holder for converted atoi values
            int pri = 0;//iterator for previous digit arra
            posCounter count = new posCounter();
            String pre = null;
            //char pre[5];//previous digit characters array
            char[] mis_match = mm.toCharArray();

            for (i = 0; i < mis_match.length; i++){
                    if(isalpha(mis_match[i]) && in == 1 && pre != null){
                            con += Integer.parseInt(pre);
                            count.positions.add(con);
                            //positions[pi] = con;
                            con++;
                            //pi++;
                            count.numEvents++;
                            in = 0;
                            pre = null;
                            pri = 0;
                    }else if(isalpha(mis_match[i]) && in == 0){
                        count.positions.add(con);    
                        //positions[pi] = con;
                            con++;
                            pi++;
                    }else if(isdigit(mis_match[i])){
                        if(pre == null){
                            pre = String.valueOf(mis_match[i]);
                        }else{
                            pre = pre + mis_match[i];
                        }
                            //pre[pri] = mis_match[i];
                            pri++;
                            in = 1;
                    }
            }

            if(pre != null){
                con += Integer.parseInt(pre);
                count.positions.add(con);
                    //con += atoi(pre);
                    //positions[pi] = con;
                count.numEvents++;
                    pi++;
            }

            return count;
    }