How to Filter a List by Text, Pattern, or Length
You've got a list and you need only some of it - the lines containing a keyword, the ones that look like email addresses, everything except the blank lines, or anything over a certain length. Doing this by hand means scrolling and manually deleting rows one at a time. A filter tool does it in one pass.
Quick answer
To filter a list of lines, paste it into a filter tool and choose a match type - Contains, Is exactly, Starts with, a data-type preset like email or URL, or a length condition - then choose whether to keep or remove matching lines. Multiple conditions can be chained with AND/OR for more precise filtering, no regex required.
Filter your list now
Open Filter Lines →Match types
- Contains - matches a line with your text anywhere inside it.
- Is exactly - matches only lines identical to your text, no more and no less.
- Starts with / Ends with - matches based on the beginning or end of the line.
- Data type presets - "Looks like an email," a URL, or other common patterns, without typing anything.
- Is blank - matches empty or whitespace-only lines, useful for cleanup.
- Longer than / Shorter than - matches by character count instead of content.
Every match type works in two directions: Keep matching puts matching lines in the Kept panel, and Remove matching does the reverse - matching lines get removed and everything else stays.
Chaining conditions with AND / OR
Click Add condition to stack up to 8 rules. Each one has an AND/OR toggle controlling how it combines with the row before it, evaluated left to right:
- AND narrows the result - a line has to satisfy both conditions to be kept.
- OR widens the result - a line matching either condition is kept.
Example: Contains "error" AND Longer than 50 keeps only lines that both mention "error"
and run long. Change that AND to OR and it keeps any line that does either.
When you need real regex
The built-in match types cover most filtering without any special syntax. For patterns they can't express - "lines starting with a digit," "lines ending in .com" - a raw regex option is available for anyone who already knows it. An invalid pattern simply matches nothing rather than throwing an error, so it's safe to experiment.
Need to change text within lines, not filter them out?
Find & Replace edits the content of each line instead of keeping or removing whole lines.