title: How to parse the csv file without two blank fields in awk?
body: <p>The csv structure is such a way as below.</p>
  
  <pre><code>"field1","field2","field3,with,commas","field4",          
  </code></pre>
  
  <p>Ther are four fields in the csv file.<br>
  the first : field1<br>
  the second : field2<br>
  the third  : field3,with,commas<br>
  the forth : field4       </p>
  
  <p>Here is my regular expression for awk.</p>
  
  <pre><code> '^"|","|",$' 
  
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F '^"|","|",$' '{print NF}'
  6
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F '^"|","|",$' '{print $1}'
  
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F '^"|","|",$' '{print $2}'
  field1
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F '^"|","|",$' '{print $3}'
  field2
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F '^"|","|",$' '{print $4}'
  field3,with,commas
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F '^"|","|",$' '{print $5}'
  field4
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F '^"|","|",$' '{print $6}'
  </code></pre>
  
  <p>Two issues remains in my regular expression <strong>'^"|","|",$'</strong>.</p>
  
  <p>1.4 fiels to be parsed as 6 fields by <strong>'^"|","|",$'</strong>.<br>
  2.$1 and $6 was parsed into blank.</p>
  
  <p>How to write a regular expression  <strong>format</strong> to make:</p>
  
  <pre><code>echo '"field1","field2","field3,with,commas","field4",' |awk -F format '{print NF}'
  4
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F  format '{print $1}'
  field1
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F format '{print $2}'
  field2
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F foramt '{print $3}'
  field3,with,commas
  debian8@hwy:~$ echo '"field1","field2","field3,with,commas","field4",' |awk -F format '{print $4}'
  field4
  </code></pre>