Pull matching lines out of a long text

Logs, exports, pasted lists — keep only the lines that matter, or strip the noise out, without a script.

Tools used in this guide

The job

You have a block of lines — a server log, a CSV dump, a pasted inventory — and you need either the lines that mention "error" or everything except them. Doing this by hand means scrolling and deleting; the line filter does it in one pass.

How to do it

Paste the text, choose whether to keep or drop matching lines, and pick the match rule. "Contains" is the everyday choice; "whole line equals" removes exact duplicates of a template line; "regular expression" handles patterns like dates or IDs.

  • Tick "ignore letter case" when ERROR/Error/error should all match.
  • Dropped lines are counted, so you can sanity-check how much was removed.
  • The result copies back into a spreadsheet or editor as plain text.

Worked example

From a 5,000-line access log, keep lines containing " 500 " to collect the server-error hits. Or go the other way: drop every line that is exactly "--" left over from a copied terminal session.

Limits

Lines are compared as written — leading and trailing spaces count, so " warn" does not equal "warn" in exact mode. Regex runs per line on your own text; a heavy pattern on a huge paste can take a moment. The filter reorders nothing; use Sort lines if you need the survivors rearranged.