Removing whole lines if one CSV Field meets a condition

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

jmbarnet
Posts: 3
Joined: Thu May 11, 2006 2:11 am

Removing whole lines if one CSV Field meets a condition

Postby jmbarnet » Thu May 11, 2006 2:26 am

I'm using textpipe to change some CSV files. If a specific field is empty, I need to delete the entire line. I tried using restrict filters to look at the specific fields only and when I do remove all it only deletes the lines inside of that field.

Here is some sample input:

ABC123,123456,12/6/2005,blahblah,3, ,,ABC


I want the whole line deleted if either CSVfields 5 or 6 are blank.

Here is the easypattern i tried with a remove non-matching lines filter:

[longest oneOrMore letters, longest oneOrMore digits][comma][longest oneOrMore digits][comma][(digit,digit,slash,digit,digit,slash,digit,digit,digit,digit) or (digit,digit,slash,digit,slash,digit,digit,digit,digit)][comma][CSVField][comma][(longest oneOrMore digits) or (longest oneOrMore digits period longest oneOrMore digits)][comma][longest oneOrMore digits][comma][comma]['ABC']


The funny thing is that I had this working yesterday and I come in today and now it doesn't. Any help would be greatly appreciated.

jmbarnet
Posts: 3
Joined: Thu May 11, 2006 2:11 am

Postby jmbarnet » Thu May 11, 2006 10:01 pm

Nevermind, I figured out a way to do it :D .


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 5 guests