Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove All Lines except lines with a Specific Word - Notepad++

Tags:

notepad++

I have exported a Backup Report that displays Backup Status of servers, the servers have a Parent Job and Child Job. The status of the Report is only relevant to the lines related to the Parent Job and Child Jobs provide irrelevant information. The Parent Job contains the keyword "Weekly". How can I display the report to only show lines with the word Weekly ,all other lines should be removed. Thanks.

like image 529
user3286165 Avatar asked Feb 08 '14 04:02

user3286165


People also ask

How do you delete a line in Notepad++ that contains a specific text string?

Method 1: Remove lines using Bookmark feature in Notepad++ Click to select the Mark tab. Enable the Bookmark line checkbox. Set Search Mode to Normal. From the Search menu, click Bookmark, and click Remove Bookmarked Lines.

How do I get rid of lines in notepad?

Open TextPad and the file you want to edit. Click Search and then Replace. In the Replace window, in the Find what section, type ^\n (caret, backslash 'n') and leave the Replace with section blank, unless you want to replace a blank line with other text. Check the Regular Expression box.

How do I delete a range of lines in Notepad++?

Is there a way to do this in Notepad++? In notepad++, there is a way to bookmark lines with a search, and then delete those bookmarked lines. No regex necessary. If a search is not needed, the you can bookmark the lines to remove with Ctrl+F2 , and then use menu Search => Bookmark => Remove Bookmarked Lines .


1 Answers

1- Assume this is your file and you want to delete all lines which doesn't have "WScript" in it.

enter image description here

2- Do a regex find as shown below. BookMark all the required lines. enter image description here

3- Then remove the unmarked lines enter image description here

like image 194
Pankaj Jaju Avatar answered Sep 18 '22 16:09

Pankaj Jaju