A compilation of Notepad++ manipulations that I have found helpful. Leaving it here for my reference (as well as for anyone it may be of help).
Table of contents
Remove lines that don't contain a phrase
- Find what:
(?!^.*target.*$)^.+
- Replace with: leave blank
- Search Mode: Regex
- Matches Newline: Unchecked
Remove lines that contain a phrase
- Find what:
.*target.*\r?\n
- Replace with: leave blank
- Search Mode: Regex
- Matches Newline: Unchecked
Remove everything before a phrase in each line
- Find what:
.+(target)
- Replace with:
- leave blank to remove everything including target
-
\1
to remove everything excluding target
- Search Mode: Regex
- Matches Newline: Unchecked
Remove everything after a phrase in each line (including target)
- Find what:
target.*
- Replace with: leave blank
- Search Mode: Regex
- Matches Newline: Unchecked