Two directions
Keep retains only matching lines; Drop removes them. Without regex the pattern is a literal substring; with regex checked it is a full JS regular expression — the "i" toggle makes either case-insensitive.
Frequently asked questions
Anchored match?
With regex on, use ^ and $ — e.g. ^ERROR for lines starting with ERROR.
Empty lines?
Blank lines are always skipped.
Invert a grep?
Drop is exactly grep -v.