Delete all lines that NOT contains a specific phrase
- 
 Hi again to all. 
 there’s a way in a txt file to delete all lines that do NOT contain a specific phrase?
 For example in a text file I want to remove all lines that do NOT contain the phrase:
 Audio format is not Red Book PCMthe lines that contain this phrase must remain intact. 
 Thanks in advance
- 
 I’m not on a PC currently but this type of question has been asked many times. THIS is a post I presented which should help you. Terry 
- 
 @Rockberto-Manenti said in Delete all lines that NOT contains a specific phrase: there’s a way in a txt file to delete all lines that do NOT contain a specific phrase? 
 For example in a text file I want to remove all lines that do NOT contain the phrase:
 Audio format is not Red Book PCMthe lines that contain this phrase must remain intact. Try this: Select Search | Replace… from the main menu, fill in the dialog like this: Find what: (?-s)^(?!.*?Audio format is not Red Book PCM).*(\R|\z)
 Replace with: (leave empty)
 Wrap around checked
 Search Mode: Regular expressionand click Replace All. 
- 
 
