Example txt file
ADD 'Cordless Screwdriver' 30 1 2
COST 'Multi Bit Ratcheting'
FIND 'Thermostat'
FIND 'Hand Truck'
SELL 'Hammer' 1
QUANTITY 'Paint Can'
FIRE 'Joshua Filler'
HIRE 'Lewis hamilton' 35 G
PROMOTE 'Lewis hamilton' M
SCHEDULE
Code
File inputFile = new File("src/edu/iu/c212/resources/input.txt");
String[] inputWords = null;
FileReader inputReader = new FileReader(inputFile);
BufferedReader bri = new BufferedReader(inputReader);
String y;
while ((y = bri.readLine()) != null) {
inputWords = y.split(" ");
--- Project Code That Handles Split Up Lines ---
}
Is there a way I can have the split not split items within the apostrophes when going across the line? That way regardless if the first Item is one word or two words, if I call inputWords[1] It will always return the full string.
What happens: "Multi Bit Ratcheting" -> inputWords[1] -> 'Multi
What I want: "Multi Bit Ratcheting" -> inputWords[1] -> 'Multi Bit Ratcheting'