163
rated 0 times
[
167]
[
4]
/ answers: 1 / hits: 30017
/ 12 Years ago, thu, september 13, 2012, 12:00:00
I have a question relating to the answer on this post Javascript code to parse CSV data
I'm finding I get an extra "rn"
on the end which I don't want to add to the array. I've tried to break out of the while loop...
The original working line is
while (arrMatches = objPattern.exec( strData )){
but I need to break out if arrMatches = "rn"
while ((arrMatches[ 1 ] != "\r\n") && arrMatches = objPattern.exec( strData )){
but get an Invalid left-hand side in assignment
error.
What is the correct syntax?
More From » javascript