Glob Pattern Tester
Check which of your file paths match glob patterns such as **/*.test.ts or !dist/**. Shows which pattern decided each path.
Processed on your device. Files are not uploaded
How to test a glob pattern
Enter your patterns
One per line. Start with ! to exclude.
Enter some file paths
One per line.
Read the results
Each path shows whether it matches and which pattern decided.
Worked example
This is what Glob Pattern Tester gives for its own sample values. Open the tool above and change anything to try your own.
Patterns, one per line (start with ! to exclude)
src/**/*.ts !**/*.test.ts *.md
File paths to test, one per line
src/index.ts src/lib/util.ts src/lib/util.test.ts README.md docs/guide.md package.json
| Path | Result | Decided by |
|---|---|---|
| src/index.ts | Match | src/**/*.ts |
| src/lib/util.ts | Match | src/**/*.ts |
| src/lib/util.test.ts | No match | !**/*.test.ts |
| README.md | Match | *.md |
| docs/guide.md | Match | *.md |
About Glob Pattern Tester
Check which paths match patterns such as src/**/*.ts, with exclusions like !**/*.test.ts. The pattern that decided each path is shown, so you can see why a file is in or out.
FAQs
What does ** mean?
It matches across folders, so src/**/*.ts matches files at any depth under src.
Do exclusions work like .gitignore?
The last matching pattern decides, so put ! patterns after the ones they refine.
Can I make a .gitignore?
Use .gitignore Generator.