I am trying to read a .csv file that has length and quantity columns. I am able to read the first column ( 12.5, 10, 8....) but the quantity field is always empty. I am obviously new to lua and was wondering if anyone had an idea as to why by quantity is always empty.
function ReadFileNameWindows(PassedInWindowsPath)
local fileList = {}
for line in io.lines(PassedInWindowsPath) do
local length,quantity = line:match("%s*(.-),%s*(.-)")
print(length)
print(quantity)
fileList[#fileList + 1] = { length = length, quantity = quantity }
end