Rudolf,
<br/><br/>That is perfect! &nbsp;Thank you so much. &nbsp;I love the simple yet elegant solutions.
<br/><br/>I tested it with the large file and it works great. &nbsp;And best of all, it is included in the basic system.
<br/><br/>Sincerely,
<br/><br/>Joe.
<br/><br/><div class='shrinkable-quote'><br/>&gt; On Jun 18, 2016, at 12:25 PM, Rudolf Rednose [via Smalltalk] &lt;<a href="/user/SendEmail.jtp?type=node&node=4901718&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:
<br/>&gt; 
<br/>&gt; Hello Joseph, maybe
<br/>&gt; findTokens:',' escapedBy: '&quot;'
<br/>&gt; is sufficient.
<br/>&gt; &nbsp;
<br/>&gt; for example:
<br/>&gt; |data fields|
<br/>&gt; data := OrderedCollection new.
<br/>&gt; data add: '02/04/2016 &nbsp;Thu,,&quot;COSTCO WHSE #0388 000000000990388 - OAK BROOK, IL&quot;,,,,,37.00,,,,,,,,' copy.
<br/>&gt; data add: '02/05/2016 &nbsp;Fri,,&quot;ELECTRONIC PAYMENT RECEIVED-THANK&quot;,,,,,-443.52,,,,,,,,' copy. 
<br/>&gt; data add: '02/06/2016 &nbsp;Sat,,&quot;COSTCO WHSE #1088 000000000991088 - BOLINGBROOK, IL&quot;,,,,,50.86,,,,,,,,' copy. 
<br/>&gt; data do:[ :item |
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; fields := item findTokens:',' escapedBy: '&quot;'.
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &quot;show result in Transcript&quot;
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; Transcript cr; show: 'Line: ', item; cr; show: 'Number of Fields:', fields size asString; cr.
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; 1 to: fields size do:[:n| Transcript show:( n asString,' [', (fields at: n),']');cr]
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; ].
<br/>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
<br/>&gt; Line: 02/04/2016 &nbsp;Thu,,&quot;COSTCO WHSE #0388 000000000990388 - OAK BROOK, IL&quot;,,,,,37.00,,,,,,,,
<br/>&gt; Number of Fields:16
<br/>&gt; 1 [02/04/2016 &nbsp;Thu]
<br/>&gt; 2 []
<br/>&gt; 3 [COSTCO WHSE #0388 000000000990388 - OAK BROOK, IL]
<br/>&gt; 4 []
<br/>&gt; 5 []
<br/>&gt; 6 []
<br/>&gt; 7 []
<br/>&gt; 8 [37.00]
<br/>&gt; 9 []
<br/>&gt; 10 []
<br/>&gt; 11 []
<br/>&gt; 12 []
<br/>&gt; 13 []
<br/>&gt; 14 []
<br/>&gt; 15 []
<br/>&gt; 16 []
<br/>&gt; Line: 02/05/2016 &nbsp;Fri,,&quot;ELECTRONIC PAYMENT RECEIVED-THANK&quot;,,,,,-443.52,,,,,,,,
<br/>&gt; Number of Fields:16
<br/>&gt; 1 [02/05/2016 &nbsp;Fri]
<br/>&gt; 2 []
<br/>&gt; 3 [ELECTRONIC PAYMENT RECEIVED-THANK]
<br/>&gt; 4 []
<br/>&gt; 5 []
<br/>&gt; 6 []
<br/>&gt; 7 []
<br/>&gt; 8 [-443.52]
<br/>&gt; 9 []
<br/>&gt; 10 []
<br/>&gt; 11 []
<br/>&gt; 12 []
<br/>&gt; 13 []
<br/>&gt; 14 []
<br/>&gt; 15 []
<br/>&gt; 16 []
<br/>&gt; Line: 02/06/2016 &nbsp;Sat,,&quot;COSTCO WHSE #1088 000000000991088 - BOLINGBROOK, IL&quot;,,,,,50.86,,,,,,,,
<br/>&gt; Number of Fields:16
<br/>&gt; 1 [02/06/2016 &nbsp;Sat]
<br/>&gt; 2 []
<br/>&gt; 3 [COSTCO WHSE #1088 000000000991088 - BOLINGBROOK, IL]
<br/>&gt; 4 []
<br/>&gt; 5 []
<br/>&gt; 6 []
<br/>&gt; 7 []
<br/>&gt; 8 [50.86]
<br/>&gt; 9 []
<br/>&gt; 10 []
<br/>&gt; 11 []
<br/>&gt; 12 []
<br/>&gt; 13 []
<br/>&gt; 14 []
<br/>&gt; 15 []
<br/>&gt; 16 []
<br/>&gt; &nbsp;
<br/>&gt; Sincerely, 
<br/>&gt; Rudolf.
<br/>&gt; Gesendet: Freitag, 17. Juni 2016 um 22:42 Uhr
<br/>&gt; Von: &quot;Joseph Alotta&quot; &lt;[hidden email]&gt;
<br/>&gt; An: [hidden email]
<br/>&gt; Betreff: [Newbies] CSV file help
<br/>&gt; Greetings,
<br/>&gt; 
<br/>&gt; I am needing conceptual help with parsing these troublesome CSV files. I was breaking the lines using String &gt;&gt; findToken:
<br/>&gt; 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/>&gt; 
<br/>&gt; 
<br/>&gt; 02/04/2016 Thu,,&quot;COSTCO WHSE #0388 000000000990388 - OAK BROOK, IL&quot;,,,,,37.00,,,,,,,,
<br/>&gt; 02/05/2016 Fri,,&quot;ELECTRONIC PAYMENT RECEIVED-THANK&quot;,,,,,-443.52,,,,,,,,
<br/>&gt; 02/06/2016 Sat,,&quot;COSTCO WHSE #1088 000000000991088 - BOLINGBROOK, IL&quot;,,,,,50.86,,,,,,,,
<br/>&gt; 
<br/>&gt; I think I need to parse with the double quotes in mind, but I don’t know where to break it.
<br/>&gt; 
<br/>&gt; Also, I was reading in the squeak pages that someone had already written code for this, but I couldn’t find anything.
<br/>&gt; 
<br/>&gt; <a href="http://wiki.squeak.org/squeak/3260" target="_top" rel="nofollow" link="external">http://wiki.squeak.org/squeak/3260</a>&nbsp;has two methods, CSVSubstrings and SequenceableCollection-asCSVLine.st
<br/>&gt; 
<br/>&gt; Does anyone know where these are now?
<br/>&gt; 
<br/>&gt; Sincerely,
<br/>&gt; 
<br/>&gt; Joe.
<br/>&gt; 
<br/>&gt; 
<br/>&gt; 
<br/>&gt; _______________________________________________
<br/>&gt; Beginners mailing list
<br/>&gt; [hidden email]
<br/>&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br/>&gt; 
<br/>&gt; _______________________________________________ 
<br/>&gt; Beginners mailing list 
<br/>&gt; [hidden email] 
<br/>&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br/>&gt; 
<br/>&gt; 
<br/>&gt; If you reply to this email, your message will be added to the discussion below:
<br/>&gt; <a href="http://forum.world.st/CSV-file-help-tp4901546p4901691.html" target="_top" rel="nofollow" link="external">http://forum.world.st/CSV-file-help-tp4901546p4901691.html</a><br/>&gt; To start a new topic under Squeak - Beginners, email <a href="/user/SendEmail.jtp?type=node&node=4901718&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a> 
<br/>&gt; To unsubscribe from Squeak - Beginners, click here.
<br/>&gt; NAML
</div><br/>

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://forum.world.st/CSV-file-help-tp4901546p4901718.html">Re: [Newbies] CSV file help</a><br/>
Sent from the <a href="http://forum.world.st/Squeak-Beginners-f107673.html">Squeak - Beginners mailing list archive</a> at Nabble.com.<br/>