Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1186.Advanced search and replace -- How to delete all columns with more than 8 words in text file?

User: Aaron -- 2014-03-17          << 1185  1187 >>
Hits: 1182
Type: Advanced search and replace   
Search all Advanced search and replace examples
Hello: I would like to delete phrases composed of 8 words or more that are delimited by two pipe symbols " | "

If it is the first phrase in a line it is delimted by only a single pipe at the end. The pipes should also be deleted as per the example below.
Input Sample:
The man rode his bike to town and bought lunch|The day was hot|It was Thursday|He was late and missed his friend who was angry|
Output Sample:
The day was hot|It was Thursday|
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file
2. ctrl-h open 'replace' dialogue
* set 'search for pattern' to:

3. click 'replace', done.
4. ctrl-s save to file.

Screenshot 1:  Replace_Window

Similar Examples:
How to extract all lines longer than 80 characters from a text file? (68%)
How to delete all the lines without ceramics in text file? (67%)
How to delete all lines with column B greater than 90 in multiple csv files? (67%)
How to replace the content of XML with a list of words from text file? (66%)
How to count the occurrence of a list of words in a text file? (66%)
How to extract all lines with more than 30 characters from multiple files? (66%)
How to delete last column in a csv file? (65%)
How to delete the second column in multiple text files? (65%)

Check Demo of Advanced search and replace
phrases  delimited  symbols  phrase  more than  comp  symbol  sym  two  columns  delete two columns  delete first two  first two words  delete symbols in text file  delete first words  delete columns in text file  delete columns  delete end of line