Sublime - delete all lines containing specific value
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
- Select string of interest
- Hit Alt+F3 to go into multi-cursor mode on all occurrences (Ctrl+CMD+G on Mac OS X)
- Hit Ctrl+L [see comments] (Cmd+L on Mac)
- Copy-paste selection to another buffer
- Del
This is what i found for the windows users:
- Select the string (every line containing this string is to be removed).
- Press ALT+F3 .
- Press Ctrl+L .
- Press Delete .
Neither of the regex code suggested above worked in my case, but this did work:
.*(text in question).*