Page 1 of 1

remove comma from end of field

Posted: Wed Mar 05, 2008 2:42 am
by sheridany
I am using the remove delimited fields to retain certain csv fields into a output file and a comma is remaining after the last field that I need to remove as well.
It looks like this after processing the remove delimited fields. I need to get rid of the last comma.

field1, field2, field3,
abc, def, ghi,
jkl, mno, pqr,

Any suggestions. I have tried using [TextEnd] etc and nothing gets rid of it. I just want it to be blank at the end of the line.

Posted: Wed Mar 05, 2008 7:43 am
by DataMystic Support
Hi Sheridan,

Try the EasyPattern:

Code: Select all

,[LineEnd]

That Worked!

Posted: Wed Mar 05, 2008 8:47 am
by sheridany
Thanks!
:D

One more small thing

Posted: Wed Mar 05, 2008 9:52 am
by sheridany
I only want the lines where the csvfield 2 called q2oe is not null.
tracknum,q2oe
7482-005544-6953
7482-005543-8801,"Because they
482-005531-2330
7482-005538-9415
7482-005538-8759
7482-005538-0158
7482-005545-8564
7482-005538-2549
7482-005544-2431
7482-005574-8737,He neglected

Posted: Wed Mar 05, 2008 10:28 am
by DataMystic Support
I assume this is a new request unrelated to the old one.

So...

Use a Remove Lines Not Matching EasyPattern:
[ LineStart, 0+ not comma, comma ]

Posted: Wed Mar 05, 2008 10:33 am
by sheridany
Same project. I just needed the last filter to delete the records with no second csv field populated. It worked perfectly.