<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hello Joseph, maybe<br/>
findTokens:&#39;,&#39; escapedBy: &#39;&quot;&#39;<br/>
is sufficient.<br/>
&nbsp;</div>

<div>for example:</div>

<div>&#124;data fields&#124;<br/>
data := OrderedCollection new.<br/>
data add: &#39;02/04/2016 &nbsp;Thu,,&quot;COSTCO WHSE #0388 000000000990388 - OAK BROOK, IL&quot;,,,,,37.00,,,,,,,,&#39; copy.<br/>
data add: &#39;02/05/2016 &nbsp;Fri,,&quot;ELECTRONIC PAYMENT RECEIVED-THANK&quot;,,,,,-443.52,,,,,,,,&#39; copy.&nbsp;<br/>
data add: &#39;02/06/2016 &nbsp;Sat,,&quot;COSTCO WHSE #1088 000000000991088 - BOLINGBROOK, IL&quot;,,,,,50.86,,,,,,,,&#39; copy.&nbsp;</div>

<div>data do:[ :item &#124;</div>

<div>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;fields := item findTokens:&#39;,&#39; escapedBy: &#39;&quot;&#39;.</div>

<div>&nbsp; &nbsp; &nbsp; &nbsp; &quot;show result in Transcript&quot;<br/>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Transcript cr; show: &#39;Line: &#39;, item; cr; show: &#39;Number of Fields:&#39;, fields size asString; cr.<br/>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;1 to: fields size do:[:n&#124; Transcript show:( n asString,&#39; [&#39;, (fields at: n),&#39;]&#39;);cr]<br/>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;].</div>

<div>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</div>

<div>Line: 02/04/2016 &nbsp;Thu,,&quot;COSTCO WHSE #0388 000000000990388 - OAK BROOK, IL&quot;,,,,,37.00,,,,,,,,<br/>
Number of Fields:16<br/>
1 [02/04/2016 &nbsp;Thu]<br/>
2 []<br/>
3 [COSTCO WHSE #0388 000000000990388 - OAK BROOK, IL]<br/>
4 []<br/>
5 []<br/>
6 []<br/>
7 []<br/>
8 [37.00]<br/>
9 []<br/>
10 []<br/>
11 []<br/>
12 []<br/>
13 []<br/>
14 []<br/>
15 []<br/>
16 []</div>

<div>Line: 02/05/2016 &nbsp;Fri,,&quot;ELECTRONIC PAYMENT RECEIVED-THANK&quot;,,,,,-443.52,,,,,,,,<br/>
Number of Fields:16<br/>
1 [02/05/2016 &nbsp;Fri]<br/>
2 []<br/>
3 [ELECTRONIC PAYMENT RECEIVED-THANK]<br/>
4 []<br/>
5 []<br/>
6 []<br/>
7 []<br/>
8 [-443.52]<br/>
9 []<br/>
10 []<br/>
11 []<br/>
12 []<br/>
13 []<br/>
14 []<br/>
15 []<br/>
16 []</div>

<div>Line: 02/06/2016 &nbsp;Sat,,&quot;COSTCO WHSE #1088 000000000991088 - BOLINGBROOK, IL&quot;,,,,,50.86,,,,,,,,<br/>
Number of Fields:16<br/>
1 [02/06/2016 &nbsp;Sat]<br/>
2 []<br/>
3 [COSTCO WHSE #1088 000000000991088 - BOLINGBROOK, IL]<br/>
4 []<br/>
5 []<br/>
6 []<br/>
7 []<br/>
8 [50.86]<br/>
9 []<br/>
10 []<br/>
11 []<br/>
12 []<br/>
13 []<br/>
14 []<br/>
15 []<br/>
16 []</div>

<div>
<div>&nbsp;</div>

<div>Sincerely,&nbsp;<br/>
Rudolf.</div>

<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b>&nbsp;Freitag, 17. Juni 2016 um 22:42 Uhr<br/>
<b>Von:</b>&nbsp;&quot;Joseph Alotta&quot; &lt;joseph.alotta@gmail.com&gt;<br/>
<b>An:</b>&nbsp;beginners@lists.squeakfoundation.org<br/>
<b>Betreff:</b>&nbsp;[Newbies] CSV file help</div>

<div name="quoted-content">Greetings,<br/>
<br/>
I am needing conceptual help with parsing these troublesome CSV files. I was breaking the lines using String &gt;&gt; findToken:<br/>
but I found lines where extra deliminators were added. Notice the three following lines, the first and third line have extra commas from Oak Brook, IL and the second line does not have the comma.<br/>
<br/>
<br/>
02/04/2016 Thu,,&quot;COSTCO WHSE #0388 000000000990388 - OAK BROOK, IL&quot;,,,,,37.00,,,,,,,,<br/>
02/05/2016 Fri,,&quot;ELECTRONIC PAYMENT RECEIVED-THANK&quot;,,,,,-443.52,,,,,,,,<br/>
02/06/2016 Sat,,&quot;COSTCO WHSE #1088 000000000991088 - BOLINGBROOK, IL&quot;,,,,,50.86,,,,,,,,<br/>
<br/>
I think I need to parse with the double quotes in mind, but I don&rsquo;t know where to break it.<br/>
<br/>
Also, I was reading in the squeak pages that someone had already written code for this, but I couldn&rsquo;t find anything.<br/>
<br/>
<a href="http://wiki.squeak.org/squeak/3260" target="_blank">http://wiki.squeak.org/squeak/3260</a> has two methods, CSVSubstrings and SequenceableCollection-asCSVLine.st<br/>
<br/>
Does anyone know where these are now?<br/>
<br/>
Sincerely,<br/>
<br/>
Joe.<br/>
<br/>
<br/>
<br/>
_______________________________________________<br/>
Beginners mailing list<br/>
Beginners@lists.squeakfoundation.org<br/>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a></div>
</div>
</div></div></body></html>