Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1396.Advanced search and replace -- How to extract all lines by specified words in group?

User: y8888 -- 2017-07-27          << 1395  1397 >>
Hits: 2378
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to find related words? 
if any of words in input.txt can be found in word_list.txt, then put it in output.txt
Input Sample:
Input Sample: 
word_list.txt: 
chlamydia 
demystify 
disport 
enemy 
mouth 
mystery 
outside 
south 
spoilsport 
sportful 
sporting 
sportive 
throughout 
without 
 
input.txt: 
sport 
out 
my
Output Sample:
Output Sample: 
output.txt  
sport 
di★sport☆ 
spoil★sport☆ 
★sport☆ful 
★sport☆ing 
★sport☆ive 
 
out 
with★out☆ 
s★out☆h 
★out☆side 
through★out☆ 
m★out☆h 
 
my 
ene★my☆ 
★my☆stery 
de★my☆stify 
chla★my☆dia
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open input.txt 
2. ctrl-h open 'replace' dialogue 
* set 'replace unit' to 'Line' 
* set 'replace with pattern' to:  
* click 'advanced' tab: 
* set 'run following at the beginning of replace' to: 
 
* set 'run following for each matched unit' to: 
 
3. click 'replace', done. 
4. ctrl-s save to file.

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to extract lines with specific words in first column? (80%)
How to extract all lines that contain specified words or phrases? (77%)
How to extract all lines that contain specific words in a file? (75%)
How to extract random lines containing specified words? (74%)
How to extract lines containg specified words from many files? (72%)
How to extract all lines with specified date range from text file? (72%)
How to extract all sentences that contain specified words? (72%)
How to sort all lines of text by specified keyword? (72%)

Check Demo of Advanced search and replace
Keywords:
grep  found  group  specified words  extract all lines  else  find  extract all line  test  input  group lines  find 2 words  find tab  extract specified lines  output found  split txt file each lines  join 2 lines if  join lines if