Files / LOCAL TOOL

Glob Pattern Tester

Test minimatch glob patterns and ordered exclusions against a local list of paths.

Runs locally — input is never uploaded
minimatch · one per line
One path per line
ResultsReady when you are

WHAT IT DOES

See which paths the pattern really selects.

Enter minimatch patterns and a realistic list of paths, then see which paths are included and which pattern made the final decision. Patterns are evaluated from top to bottom so a later negation can exclude an earlier match and a later positive pattern can include it again. Case sensitivity, dotfiles, and basename matching stay explicit because changing any one of them can change a build, test, or packaging rule without changing the pattern text.

Why use it?

Use it to test an ordered include/exclude list against realistic paths before a packaging or build rule omits the wrong files.

How to use this tool

  1. Enter patterns and a list of candidate paths in their separate panes.
  2. Set case sensitivity, dotfile handling, and basename matching to the intended behavior, then test.
  3. Try src/** followed by !src/**/*.test.ts and include both ordinary and test files in the candidates. Inspect the final deciding pattern for each result.
  4. This is minimatch behavior over supplied text, not a filesystem scan or a .gitignore evaluator; verify rules in the consuming tool too.

Details and limitations

  • The syntax is minimatch glob syntax with stars, double stars, character classes, brace expansion, extglobs, and leading exclusions.
  • This is not a shell expander or a .gitignore parser; no filesystem is scanned and the tested paths are exactly the lines entered.
  • Each result names the last pattern that decided its state, which makes ordered include and exclude lists reviewable.
  • Dotfile, case, and match-basename behavior are separate options and never inferred from the current operating system.

WORKED EXAMPLES

Explain the last matching include or exclusion

Test these ordered patterns against ordinary source, a source test, and a file outside src. Leave basename matching off to test the complete paths.

Patterns

src/**
!src/**/*.test.ts

Paths

src/main.ts
src/main.test.ts
README.md

Expected result

src/main.ts is included, src/main.test.ts is excluded by the later negation, and README.md is unmatched. Reordering patterns can change the final decision.

COMMON QUESTIONS

Glob Tester questions

Does this use .gitignore pattern rules?
No. It uses minimatch syntax, which is common in JavaScript build and test tools. .gitignore has different anchoring and directory rules; use the .gitignore Generator for that workflow.
Why does a dotfile not match a wildcard?
Minimatch excludes a leading dot from ordinary wildcards by default. Enable Dotfiles when the target tool is configured to include them.
Does the tester read files from my project?
No. Browsers do not receive access to a project directory here. Paste the relative paths you want to test and the matching remains deterministic and local.