Filter Lines
Drop every line that contains a pattern — or keep only the lines that do. Plain substring matching or full regex.
More options
How to use Filter Lines by Substring
- Paste the lines you want to filter.
- Type the substring or regex pattern.
- Pick 'Remove lines containing' or 'Keep lines containing'.
- Turn on regex or case-insensitive matching if needed.
- Copy or save the filtered result.
What is Filter Lines by Substring?
This is a browser-side mini grep: type a substring or a regular expression and either remove every matching line or keep only the matching lines. It is helpful for trimming logs, scrubbing email lists, or pulling specific entries out of a long file. The case-insensitive toggle changes both substring and regex matching.
FAQ
- What regex flavour is supported?
- Standard JavaScript regular expressions. The case-insensitive checkbox adds the i flag for you.
- Are blank lines kept?
- Blank lines are kept unless they happen to match your pattern.
Related tools
People also use
- Find and Replace🔍 Find & Replace
Find and Replace — Replace any pattern in your text — exact match or regex, case-sensitive or not. Runs entirely client-side inside your browser.
- Add Prefix / Suffix to Lines↕️ Sorting & Lines
Add Prefix / Suffix to Lines — Add the same prefix or suffix (or both) to every line of your text. Runs entirely client-side inside your browser.
- BBCode to HTML🔄 Transformation
Free online BBCode to HTML converter. Convert BBCode tags like [b], [i], [url], [img], [quote], [list], [color], and more to clean HTML markup.