I am sorry folks I thought this might have been a simple exercise.
I download a file each day which has has something which looks like the following....
AAX,20110914,2.55,2.56,2.45,2.47,142344
AAY,20110914,0.05,0.05,0.05,0.05,0
AAZPB,20110914,87.85,87.85,87.5,87.52,1253
ABC,20110914,2.69,2.7,2.61,2.63,3338636
ABN,20110914,0.001,0.001,0.001,0.001,0
There are approximately 2500 lines but as you can see, all lines begin with a 3 letter code (stock symbol). I only want to retain the lines of code which have 3 characters in the symbol which ends (always) in a comma "," If I can clean the file it means that my database is not cluttered with 'stuff' that I don't want, saving the need for removal as a maintanence project at the weekend. So what I would like to do is simply look at each line, find the first comma, and if that line has more than 3 characters before it encounters the comma, remove to another file so that I can eyeball to make sure I have not deleted something by mistake...... then I can convert the filtered stuff for use by another piece of software.