Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

690.Text file parser -- How to extract all odd columns 1,3,5,... from a text file?

User: editor -- 2011-01-04          << 689  691 >>
Hits: 3650
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract all odd columns 1,3,5,... from a text file?
Input Sample:
A1 A2 A3 A4 A5 
B1 B2 B3 B4 B5 B6 B7 
C1 C2 C3 C4 C5
Output Sample:
A1 A3 A5 
B1 B3 B5 B7 
C1 C3 C5 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file 
2. ctrl-h open 'replace' window 
* set 'replace unit' to 'Line' 
* set 'replace with pattern' to: 
 
3. click 'replace', done! 
 
Note:  
* Need to use version Replace Pioneer 2.6 or newer. 
* Here use range parameter of function words(), 1<2> means start from 1, and increasing with step of 2, which means 1,3,5,7,... 
 
Refer to words() definition in: 
http://www.mind-pioneer.com/replace/help/Functions.html

Screenshot 1:  Replace_Window


Similar Examples:
How to extract all IP address from a text file? (71%)
How to extract the second column from a database text file? (70%)
How to extract all telephone numbers from a text file? (70%)
How to extract all html address from a text file? (69%)
How to extract all upper cases words from a text file? (67%)
How to extract all lines with numbers from many text files? (66%)
How to extract all specified date format from a text file? (65%)
How to extract the 7th column from text files with 8 columns? (65%)

Check Demo of Text file parser
Keywords:
extract all odd columns  definition  odd  parameter  range  functions  increasing  refer  help  increas  definition range  range definition  extract range of text  replace text definition  extract all function of a file  extract function parser  extract columns  replace odd