I have a text file with following content:
Test, [636,13,"be738jsk","some, text",js]
I want to read this content into an Array. I currently use JavaScript with regex to split into substrings directly into an array.
As regex i have:
line.split(/,\s\[|",|,"|","/);
The problem is, i have some sentences like in the example with a "," in it and i don't want to split there. So i tried to say in the regex, "split after , and everthing except whitespace". The problem is, it also cuts out the "everything" after the ,
Example:
Test, [63737,33,"bla,blablba",737]
When i use this regex:
Line.split(/,"|,\s\[|",|,[^\s]/);
Then it cut's out the 3 from 33 :(