Test glob patterns before using them

Does src/**/*.ts match src/app/page.tsx? Test *, **, ?, [class], and {a,b} against a path list before committing it to config.

Tools used in this guide

The job

Globs look trivial until ** behaves differently across tools, or a brace does not expand where you expected. Testing against real paths is faster than a failed CI run.

Test

Write the pattern, paste one path per line, run the match. Results split into matches and non-matches so surprises stand out.

  • * stays inside one segment — src/*.ts does not reach src/app/page.tsx.
  • ** crosses separators — src/**/test/** catches nested test dirs.

Worked example

docs/**/*.{md,mdx} against a docs tree lists every markdown file including nested guides; assets.png stays in the non-match column.

Where it stops

This tool's own matching rules — it does not emulate .gitignore's leading-! negation or trailing-/ directory-only rules. Patterns up to 500 chars, 2,000 path lines checked (longer lists are truncated with a note).