I have a HTML file with a table where each row contains some text and some numbers.
I would like to catch just the numbers from each row and put them into pairs of 5.
A number´s format can be 12345-123 and then I would like to just get the first five digits.
Each five digits should be concatenated to a String and then beeing put into the ArrayList.
I have tried and tried but not succeeded yet. I have submitted my code, maybe it can help a little.
String parts = str.split("</?td>"); // get the text between the <td> and </td> tags
for(int i=1; i< parts.length; i += 2)
String nr = null;
for(int j=1; j < parts[i].length(); j++)
c = parts[i].charAt(j);
nr += c; // Concatenate each 5 digits to a string
if(calc%5==0) // Make a new line each 5 digits
list.add(nr); // Add the string with 5 digits to the list
calc = 0; // Reset the calculator