Exit a While loop based on two conditions
<p>I have a question relating to the answer on this post <a href="http://stackoverflow.com/questions/1293147/javascript-code-to-parse-csv-data/1293163#1293163">Javascript code to parse CSV data</a></p>

<p>I'm finding I get an extra "\r\n" on the end which I don't want to add to the array. I've tried to break out of the while loop...</p>

<p>The original working line is</p>

<pre><code> while (arrMatches = objPattern.exec( strData )){
</code></pre>

<p>but I need to break out if arrMatches = "\r\n"</p>

<pre><code>while ((arrMatches[ 1 ] != "\\r\\n") &amp;&amp; arrMatches = objPattern.exec( strData )){
</code></pre>

<p>but get an <code>Invalid left-hand side in assignment</code> error.</p>

<p>What is the correct syntax?</p>

<p>Thank you</p>
