What Is Remove Lines by Keyword?
Remove whole physical lines that match any saved keyword or regex pattern. Retained line contents stay unchanged; separators become LF. Review the remaining and removed counts before exporting.
How to Filter Lines
- Paste independent text records, such as a log excerpt.
- Type a nonblank keyword and press Add or Enter. Presets add literal tokens; choose a literal mode for them.
- Select a matching mode and click Apply Filter.
- Review the output and counts. Copy or Download TXT if the result has text.
How the Matching Modes Work
Contains is case-sensitive substring matching. Case Insensitive compares lowercased strings, not universal locale-aware case folding. Starts With, Ends With and Exact Match trim line edges for comparison only. All modes use OR: one matching keyword removes that entire line. Keyword entry trims its edges; use regex escapes to target edge spaces.
Regex takes JavaScript pattern text without slash delimiters, using Unicode mode and case-sensitive matching against each physical line. Invalid syntax fails the entire operation visibly, with no literal fallback. Apply runs in a background worker; edits, Cancel or a two-second timeout terminate that request. A worker-load failure keeps the input and gives an error. Timing includes startup and does not certify browser responsiveness.
Example: A Short Keyword Can Match Too Much
Use the keyword log with these three original lines.
| Input line | Contains | Exact Match |
|---|---|---|
| catalog | Removed | Kept |
| log | Removed | Removed |
| LOG | Kept | Kept |
When to Filter Whole Lines
Hide a known severity prefix in a copied log excerpt.
Remove exact placeholder rows from a plain list.
Prepare a reviewed text-only subset using several independent keywords.
Common Mistakes
A comment token can also occur inside a URL or string. This is not a code-comment parser, syntax-preserving debugger cleanup or multiline CSV filter. Presets are convenience tokens, not safe deletion rules. An empty output may retain one empty item: for input A followed by LF, removing A leaves one retained item and one removed item. Counts come from records, not output truthiness.
Tips for a Reviewable Filter
Keep a backup and choose Exact Match or a specific prefix when broad substrings would overmatch. Clear All resets keywords and mode. No keywords keeps all original items while normalizing separators. Limits are 1,000,000 input UTF-16 units, 20,000 lines, 100 keywords and 1,000 units per keyword. Use Find and Replace to edit text within lines, or Remove Empty Lines for a dedicated blank policy. See Unicode regex semantics before using advanced patterns.