Remove lines containing a word
A quick way to filter lists, logs and copied results by one word.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter text, word or phrase, action and match case.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Each line is checked: if the phrase appears anywhere in it, the line is dropped in remove mode and kept in keep mode, and the reverse for lines without it. The search is literal, not a regex.
Example
Inputs: Word or phrase = error, Action = Remove lines that contain it, Match case = no. Result: Result: INFO server started INFO user signed in; Lines removed: 2; Lines left: 2.
INFO server started ERROR disk full INFO user signed in error timeout
INFO server started INFO user signed in
Limits and caveats
- A part of a word also matches longer words, so cat matches catalog.
- One phrase is searched at a time.
Questions about this tool
How do I keep only the matching lines?
Choose "Keep only lines that contain it" and the tool works as a filter, much like grep.
Does it treat Error and error as the same?
Yes by default. Turn on match case to tell them apart.
Can I search for a symbol like # or @?
Yes. The search is literal, so any symbol matches as typed.
