Filter Lines
Keep lines that contain the query, or invert to drop matches. Optional ignore case and regular expressions. This is not unique-lines and not find-replace.
Rated 4.7 out of 5 based on 433 reviews
How to filter lines
- Paste one item per line in Input.
- Type the query. Turn ignore case on to match Red and red. Turn regex on only if the query is a pattern.
- Leave invert off to keep matches. Turn invert on to keep lines that do not match.
- Copy the kept lines. Invalid regex shows in the status line. Nothing is uploaded.
Line filter
Keep or drop lines that contain a query
| Contains | Substring match unless regex is on |
|---|---|
| Ignore case | en-US lowercasing for plain text |
| Invert | Keep lines that miss the query |
| Regex | JavaScript RegExp; invalid patterns error in status |
| Empty query | Keep all lines, or none if invert is on |
| Upload | None |
What filter lines does
Each line is tested against the query. Plain mode uses includes. Regex mode compiles the query. Invert flips the keep set. Order of kept lines is unchanged.
Grep versus unique versus replace
This is a keep/drop filter, like a small grep. Deduping is remove duplicate lines. Ordering is sort list. Set differences are compare lists. Changing text inside a line is find and replace.
Invalid regular expressions
A bad pattern throws. The status line shows the engine error and the previous output is cleared. Flags beyond ignore-case are not a separate field. The i flag follows the checkbox.
Use cases
Keeping log lines that mention error, dropping comments, or a regex for digits. Blank query with invert off returns the original lines.
Limits
Work stays in this tab. Huge pastes are limited by the browser. CZNull does not receive the list.