How do I save some text from a file to an array using scanner?

So, I have been trying to do this for two days now but can't find any exact help I need. The goal is to read a file from and save it into arrays. For example: Life time supply of Cheetos 2000 Lamp 20 if that's the file content I need to save "Life time of Cheetos" inside array1[ ], and 2000 to array2[ ]. I tried using the if (Character.isDigit(arr[i].charAt(0)))and it works for the integer array but when I use if (Character.isLetter(arr[i].charAt(0))) it returns so many nulls. Thanks for the help
Answers

John

import java.util.regex.*; import java.util.*; import java.io.File; public class Program { public static void main(String[] args) { List<String> lstNames = new ArrayList<>(); List<String> lstValues = new ArrayList<>(); try { File file = new File("data.txt"); Scanner input = new Scanner(file); Pattern pattern = Pattern.compile( "^(.*)\\s(\\d*)$"); while(input.hasNextLine()) { String line = input.nextLine(); Matcher matcher = pattern.matcher(line); if (matcher.find()) { lstNames.add(matcher.group(1)); lstValues.add(matcher.group(2)); } } input.close(); } catch (Exception ignore) { System.err.println(ignore.getMessage()); } String[] array1 = lstNames.toArray( new String[ lstNames.size()]); String[] array2 = lstValues.toArray( new String[ lstValues.size()]); } }