I broke my whole head =) lines are read from a text file. In one line there can be "several parameters". It is necessary to divide the line into these parameters.
There are several conditions:
Parameters are separated by spaces.
The parameter may contain spaces, but in this case it must be enclosed in double quotes ("").
No one forbids enclosing parameters without spaces in quotes.
For example, you need to divide the following line into three.
D:\test "D:\test\Название папки" "D:\test\test"
At the output of the function should receive 3 lines containing respectively:
D:\test D:\test\Название папки D:\test\test
Tell me, how would I do this? Using string.split () does not work in this case, so I decided that it needs to be implemented using regexp.match () ...
The task is further complicated by the fact that the number of parameters may not be limited. By the end of the line is meant \ r \ n
Thank you again for helping me in my task.