remove comma from end of field

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Post Reply
sheridany
Posts: 39
Joined: Thu Nov 15, 2007 4:20 am

remove comma from end of field

Post by sheridany » Wed Mar 05, 2008 2:42 am

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.

User avatar
DataMystic Support
Site Admin
Posts: 2220
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support » Wed Mar 05, 2008 7:43 am

Hi Sheridan,

Try the EasyPattern:

Code: Select all

,[LineEnd]
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

sheridany
Posts: 39
Joined: Thu Nov 15, 2007 4:20 am

That Worked!

Post by sheridany » Wed Mar 05, 2008 8:47 am

Thanks!
:D

sheridany
Posts: 39
Joined: Thu Nov 15, 2007 4:20 am

One more small thing

Post by sheridany » Wed Mar 05, 2008 9:52 am

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

User avatar
DataMystic Support
Site Admin
Posts: 2220
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support » Wed Mar 05, 2008 10:28 am

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 ]
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

sheridany
Posts: 39
Joined: Thu Nov 15, 2007 4:20 am

Post by sheridany » Wed Mar 05, 2008 10:33 am

Same project. I just needed the last filter to delete the records with no second csv field populated. It worked perfectly.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest