One thing that’s nice about the Linux program, grep, is that it only shows you lines that match your search condition and removes all non-matching lines. You can accomplish the same thing and more with the Sublime Text editor. In addition to removing non-matching lines, it can remove all non-matching text leaving you with only the matches you want. Just do the following
- Enter your search condition
- Click the Find All button
- Click Selection > Invert Selection
- Delete the inverted selection
- Hit Enter to put each match on a separate line (notice the multiple cursors flashing)
UPDATE: Actually, after you click the Find All button, you can just copy all matches (CTRL+C) and paste them into a new file to accomplish the same thing as steps 3, 4, 5.