Filter lines containing text

Paste a log, a list or any text, type what to look for, and choose to keep only the lines that match or remove them. Use plain text for a simple search or a regular expression for patterns.

Lines that match
Search as

Lines in the result: 2 of 5

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Paste the text, one item per line.
  2. Type the word, phrase or pattern.
  3. Choose Keep (only matching lines stay) or Remove (matching lines are deleted).
  4. Switch to Regex if you need a pattern, and turn off Ignore case to match case exactly.

How it works

The text is split into lines. Each line is tested for the pattern, and the lines whose result fits your choice are joined back with line breaks. A line break at the very end of the text is not counted as an extra empty line.

Worked example

In the sample, keeping lines that contain “error” with case ignored leaves two lines: the ERROR line and the “error: cannot write file” line. With the case option off, only the second one stays. Removing them leaves the three other lines.

Tips

In regex mode, ^2026-11-01 10:0 matches lines starting with that text, and ERROR|WARN matches either word. A pattern with nested repeats on very long lines can be slow, as in any regex engine.

Frequently asked questions

What is the difference between plain text and regex?

Plain text finds lines that contain exactly what you typed, so characters like a dot or a bracket mean themselves. A regular expression is a pattern, where for example ^ is the start of a line, | means "or" and \d is a digit.

What happens with an invalid regular expression?

The tool shows a message instead of a result, and nothing is lost. The same text works in plain mode. The pattern is a JavaScript regular expression, tested against each line separately.

What if the pattern box is empty?

Nothing is filtered and all lines are returned, because an empty pattern matches every line.

Is my text uploaded?

No. The filtering runs in your browser and nothing leaves the page.

More in Text

All tools in this category: Text ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.