I need to extract integers from a String into an array.
I've already got the integers, but I wasn't able to place them into an array.
public static void main(String[] args) {
String line = "First number 10, Second number 25, Third number 123";
String numbersLine = line.replaceAll("[^0-9]+", "");
int result = Integer.parseInt(numbersLine);
// What I want to get:
// array[0] = 10;
// array[1] = 25;
// array[2] = 123;
}