Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

714.Text file parser -- How to extract all lines that has more than 4 columns from csv file?

User: editor -- 2011-02-11          << 713  715 >>
Hits: 2246
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract all lines which has at least 5 columns from csv file?
Input Sample:
a1,a2,a3,a4 
b1,b2,b3,b4,b5 
c1,c2,c3,c4,c5,c6 
d1,d2 
e1,e2,e3,e4,e5,e6,e7
Output Sample:
b1,b2,b3,b4,b5 
c1,c2,c3,c4,c5,c6 
e1,e2,e3,e4,e5,e6,e7 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source csv file 
2. ctrl-h open replace window 
* set 'replace unit' to 'Line' 
* set 'if' to: 
 
3. click 'replace', done! 
4. ctrl-s save to disk. 
 
Note: above operation means remove any line that has less than 4 comma.

Screenshot 1:  Replace_Window


Similar Examples:
How to extract all lines that has more than 2 numbers? (81%)
How to extract all lines with more than 30 characters from multiple files? (70%)
How to extract all lines that contain specific words in a file? (68%)
How to extract all numbers that are greater than 60 in a text file? (68%)
How to extract all lines longer than 80 characters from a text file? (67%)
How to extract all lines that contain words in a list? (65%)
How to extract all lines that contain words A and B and C? (65%)
How to delete all columns with more than 8 words in text file? (64%)

Check Demo of Text file parser
Keywords:
more than  less  toc  extract all lines  columns  extract all line  comma  operation  csv  count  remove lines from csv  remove columns  less extract lines  extract columns csv file  extract columns from csv file  extract lines more than  remove line less than  less than lines