Filter List By Pattern
Filter a list by text or regex - match, exclude, starts/ends/contains/exact/regex modes; custom output separator. Free, offline, client-side, instant, secure.
Seven filter modes. Independent input and output separators. Preview the
first three matched and first three excluded items before committing.
RFC-agnostic on input (newline / comma / semicolon / tab / pipe / space)
and on output. Regex mode adds i flag automatically when
case-insensitive.
Matched items (preview)
Excluded items (preview)
How to Use Filter List By Pattern
- Paste your list into the input textarea. Items can be separated by newline, comma, semicolon, tab, pipe, or space - pick whichever matches your data.
- Type a filter pattern. For the non-regex modes that's just plain text; for regex mode it's a JavaScript regex without slashes (write
^[a-c], not/^[a-c]/). - Pick an output separator. Can differ from the input separator - handy for converting a CSV column to a newline-joined list, or vice versa. Defaults to matching the input.
- Select a filter mode:
- Match / Contains: keep items containing the pattern anywhere.
- Exclude: remove items containing the pattern.
- Starts / ends with: anchored substring match.
- Exact: keep items exactly equal to the pattern.
- Regular expression: full JS regex;
iflag added when case-insensitive.
- Toggle options. Case-sensitive off applies
toLowerCasefor non-regex modes (and theiregex flag). Trim whitespace strips leading/trailing space from each item before filtering. - Click Filter list or press Ctrl/Cmd + Enter. The stats line shows items in, matched, excluded, plus active mode and modifiers.
- Read the preview boxes - first three of each side, with a "(+N more)" count. Lets you sanity-check before copying the full output.
- Copy or download. Copy result uses the Clipboard API with an
execCommandfallback. Download TXT savesfiltered-list.txt.
Frequently Asked Questions
What’s the difference between filter modes?
Match keeps items that match the pattern. Exclude removes matching items. Starts With/Ends With check the beginning/end only. Contains searches anywhere in the item. Exact Match requires perfect equality. Regex allows advanced pattern matching with regular expressions.
How do I use regular expressions?
Select “Regular Expression” mode and enter a regex pattern like ^[a-c] to match items starting with a, b, or c. Use d+ for numbers, .*apple.* for items containing “apple”, etc. Invalid patterns will show an error message.
What happens if no items match my pattern?
The output will be empty, and the statistics will show “0 matched”. The preview section will display “No matches” to confirm that the filter was applied but nothing matched your criteria.
Can I filter case-insensitively?
Yes. By default, filtering is case-insensitive (so “Apple” matches “apple”). Enable the “Case Sensitive” checkbox if you want exact case matching. In regex mode, this controls whether the i flag is added.
Can the input and output use different separators?
Yes – that’s a primary feature. Input separator tells the parser how to split items; output separator tells the joiner how to rejoin matches. Comma-in → newline-out is a common “CSV column to text-list” workflow; newline-in → comma-out is the reverse.
What’s the maximum list size I can filter?
The tool can efficiently handle lists with tens of thousands of items using optimized regex operations. Performance depends on pattern complexity and your device, but most filters complete instantly.
Does this tool work offline?
Yes. Once the page loads, all filtering operations are performed locally in your browser. You can disconnect from the internet and continue using the tool without any interruption.
Can I use multiple separators in the same list?
No, you need to choose one separator per operation. If your list has mixed separators, you can either normalize them first using a find-and-replace tool, or filter multiple times with different separator settings.
What’s the difference between “Match” and “Contains” modes?
Both keep items containing the pattern – the modes are functionally the same in this tool. “Match” is named for the conceptual operation; “Contains” makes the substring intent explicit. Pick whichever reads better to you. The same applies for “Match” vs “Contains” in the stats line readout.