How to use
Paste your text
Paste into Your text, open a file, or press Try sample to load a short server log with INFO, DEBUG, WARN and ERROR lines.
Enter what to look for
Type one search term per line in Search terms. Choose Remove matching lines or Keep only matching lines, then pick how a line matches and whether any or every term must match.
Check and copy
Read the lines in, out and removed counter, check the Removed lines box, then press Copy or Download .txt on the result.
Why Remove Lines Containing Text
- Removes every line that contains a word, or keeps only those lines.
- Several search terms at once, matched with OR or AND.
- Contains, whole word, starts with, ends with, exact line or regex.
- Lists the removed lines too, and runs in your browser.
Example: cleaning a server log
The sample log has eight lines. With the default search terms DEBUG and /healthz and Remove matching lines selected, the two DEBUG lines and the two health check lines are removed, leaving four lines: the server start, the slow query warning, the pricing request and the payment error.
Switch to Keep only matching lines with the single term ERROR and only the payment webhook line remains. Change the logic to Every term matches (AND) with ERROR and payment to find errors about one feature in a long log.
Match types at a glance
Each row shows whether the search term cat matches the line.
| Match type | the cat sat | concatenate | cat food | my cat |
|---|---|---|---|---|
| Contains | Yes | Yes | Yes | Yes |
| Contains the whole word | Yes | No | Yes | Yes |
| Starts with | No | No | Yes | No |
| Ends with | No | No | No | Yes |
| Is exactly | No | No | No | No |