reading a aplhanumeric text file and trying to store to a list or array : I am using scanner.usedelimiter("[^0-9|,]") this pattern to avoid alphabets from a text file.then using hasNext and next() methods to store to a string and then list but list is adding additional o and whitespaces.

I am using Scanner class to read a text file and extract only numbers from that text file

    Scanner sc = new Scanner("123.txt");
                   sc.useDelimiter("[^0-9|,|-]");
     while (sc.hasNext()) {
                        String s=null;
                        s=sc.next();
                        list.add(s.replaceAll("\\s+",""));
    }

Actual file has data
Class   Student Details
1          total 25 students with 80% pass
2A - 3B          total 90 students with 70% pass
4A - 5B         total 69 students with 80% pass 10 distinction

Expected Output
1 25 80
2 3 90 70
4 5  69 80 10