我有一个与这篇文章的答案有关的问题Javascript code to parse CSV data
我发现我"\r\n"
最后得到了一个我不想添加到数组中的额外内容。我试图打破while循环......
原来的工作线是
while (arrMatches = objPattern.exec( strData )){
但我需要打破如果arrMatches = "\r\n"
while ((arrMatches[ 1 ] != "\\r\\n") && arrMatches = objPattern.exec( strData )){
但得到一个Invalid left-hand side in assignment
错误。
什么是正确的语法?