Sublime - delete all lines containing specific value

energ1ser picture energ1ser · Aug 12, 2014 · Viewed 92.3k times · Source

I have a 900mb log file which I can open in SublimeText 3. This file is bloated with lines similar to the following.

10/08/2014 23:45:31:828,Information,,,,ExportManager: ,No records to send and/or not connected

How can I filter out all the lines which contain No records to send and/or not connected

Answer

Jonathan Aquino picture Jonathan Aquino · Aug 12, 2014

You can do a regular expression search-and-replace:

Click Find > Replace.

Ensure that the Regular Expression button is pressed.

For the Find What field, put:

^.*No records to send and/or not connected.*\n

Leave the Replace With field empty.

Click Replace All