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
To select multiple regions using the keyboard, select a block of text, then press Ctrl+Shift+L to split it into one selection per line. When you're done with using multiple selections, just press Ctrl+K to trim all but the first.
To quickly delete a line in your code, place your cursor anywhere in the line and hit Ctrl–Shift–K (Mac and Windows).
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
For people that don't want to write a regex - you can just select the search string, hit ctrl+cmd+g
or pick "Quick Find All" from the menu, which will get you selections for each matching string; from there Home
will move every selection cursor to the start of the line, shift+End
will select every matching line, and del, del
will delete all of them.
Multiple cursor editing is fun!
i could not get the regex to work so I used Alt-F3 approach from this answer:
https://superuser.com/questions/452189/how-can-i-filter-a-file-for-lines-containing-a-string-in-sublime-text-2/598999#598999
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With