Text to filter

Filtered result

How does it work?

This tool filters out lines in text that match a specified pattern, keeping only the lines that do NOT match. It's similar to the Unix grep -v command (inverted grep).

The filtering options include:

  • Case sensitivity: When enabled, matches must have the exact same case as the pattern
  • Regular expressions: When enabled, the pattern is treated as a regular expression for more powerful matching

Example

Original text:

The quick brown fox jumps over the lazy dog.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
This line contains FOX in uppercase.
Another line with the word "fox" in lowercase.
1234 - This line has numbers.
Regular expressions are powerful.
The pattern /^T/ matches lines starting with T.
The end.

Example 1: Filter OUT lines containing "fox" (case insensitive)

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
1234 - This line has numbers.
Regular expressions are powerful.
The pattern /^T/ matches lines starting with T.
The end.

Example 2: Filter OUT lines starting with "T" (using regex ^T)

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Another line with the word "fox" in lowercase.
1234 - This line has numbers.
Regular expressions are powerful.
The end.

Regular Expression Tips

When "Use regular expressions" is enabled, you can use patterns like:

  • ^ - Match the beginning of a line (e.g., ^The matches lines starting with "The")
  • $ - Match the end of a line (e.g., end\.$ matches lines ending with "end.")
  • \d - Match any digit (e.g., \d+ matches one or more digits)
  • \w - Match any word character (letters, numbers, underscore)
  • .* - Match any characters (e.g., a.*z matches lines with "a" followed by any characters and then "z")

This tool is useful for:

  • Removing unwanted lines from logs or data files
  • Filtering out lines containing specific keywords
  • Cleaning up text by excluding lines that match certain patterns
  • Removing error messages or debug information from output
  • Excluding specific data categories from analysis

Tip:

This tool is the opposite of the regular "Grep" tool. Use regular Grep when you want to keep matching lines, and use Inverted Grep when you want to exclude matching lines.

Related Tools

All Tools

See all available tools