Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1130.Text file parser -- How to extract lines with specific words in first column?

User: shanfeng -- 2013-09-12          << 1129  1131 >>
Hits: 1386
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract lines with specific words?
Input Sample:
1 a b c d
2 a b c d
3 a b c d
4 a b c d
5 a b c d
6 a b c d
Output Sample:
1 a b c d
2 a b c d
5 a b c d
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume you want to extract all lines that has '1' or '2' or '5' as first column.

1. ctrl-o open 'text' file
2. ctrl-h open 'replace' dialogue
* set 'replace unit' to 'Line'
* set 'if' to:
  
3. click 'replace', all lines without 1,2,5 as first column will be removed.
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Similar Examples:
How to extract all lines by specified words in group? (80%)
How to extract lines containg specified words from many files? (73%)
How to extract all lines that contain specific words in a file? (73%)
How to delete all lines containing specific word in specific column? (71%)
How to extract numbers in specified position and join with comma? (68%)
How to extract all lines that contain words in a list? (67%)
How to extract all lines that contain specified words or phrases? (66%)
How to extract random lines containing specified words? (65%)

Check Demo of Text file parser
Keywords:
specific words  specific word  specific  without  extract all lines  first column  extract lines  extract all line  extract line  ass  extract specific  replace column as column1  extract specific text  extract first column  extract words to column  extract column  replace with specific  extract text first