I will list some examples bellow
local tTable = {}
tTable[1] = [[dir "C:\random files"]]
tTable[2] = [[dir "C:\random files" /b]]
tTable[3] = [[help dir]]
tTable[4] = [[dir /?]]
tTable[5] = [[del /p "C:\hello.txt" "D:\random file name.exe" "E:\other Random file.exe"]]
for i = 1,#tTable do -- use ipair if you prefer
print(tTable[i])
end
I need a function / pattern for string.gmatch (s, pattern) that can break these into individual pieces.Using the current section of code from shell causes the "" to be ignored and the spaces in the middle to be where the list is cut. I need everything spaces and all between the "" to be read in as one variable and the others to be split as normal by space.I have had no luck finding a solution to this problem I hope with your help to proceed with the project Thanks for any help in advance.












