JavaScript match() method (or equivalent) creates an array of lines from a text file. This pattern handles lines ending with \r\n as well as \n at the expense of including the line-ending chars in the output. The Matching Example is ready for enclosure in single quotes. Output from Matching Example: [0]=a " b [\n] " 'c[\n]' [\n]
[1]= "a \" ' " b 'c " \' ' [\n]
[2]= Line3... |