Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1437.Advanced search and replace -- How to remove phrases not containing any dictionary word?

User: Dilip -- 2019-03-04          << 1436  1438 >>
Hits: 2534
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
Using conditional logic, try replacing partial phrases that do not contain  
words in the dictionary. 
 
Words found in the dictionary: 
with 
packs 
sports 
Input Sample:
The Sports Audi Packs a punch 
The French Audi does not have mileage 
The green Audi comes without gear 
The Black Audi comes with gear
Output Sample:
The Sports Audi Packs a punch 
Audi 
Audi 
Audi comes with gear
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume word file is d:\test\words.txt: 
 
1. ctrl-o open source text file 
2. ctrl-h open 'replace' dialog 
* set 'replace unit' to 'Chars' 
* set 'replace scope' to 'Line' 
* set 'search for pattern' to: 
 
* set 'replace with pattern' to: 
 
-- click 'advanced' tab: 
* set 'run following at the beginning' to: 
 
* set 'run following for each' to: 
 
3. click 'replace', done. 

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to remove all lines that contains more than one word? (65%)
How to remove all the lines that do not contain any of words in a list? (64%)
How to remove any word that does not contain character @? (62%)
How to remove all lines containing key-board letters only? (59%)
How to remove all lines that contain one or more words in a list? (59%)
How to remove/delete all lines not containing 'abc'(only keep lines containing 'abc')? (59%)
How to remove all duplicated lines without considering the last word? (58%)
How to remove lines containing specified words in a text file? (57%)

Check Demo of Advanced search and replace
Keywords:
conditional  phrases  condition  replacing  phrase  diction  dictionary  found  dic  var  conditional text replace  conditional replace text  conditional search replace text  advanced text conditional replace  conditional search and replace  conditional replace  replacing file  remove text at beginning