Glob Pattern Tester
Paste glob patterns and a list of paths to see which paths match. Supports *, **, ?, character classes, brace lists, extglob and exclusions.
Use the tool
Why this tool exists
Globs are used in build tools, linters, CI configs and shells, and small differences cause missed or extra files. Testing a pattern against real paths before you commit it saves a failed build.
The tool turns each glob into a regular expression and tests every path. Patterns starting with ! exclude, and the last matching pattern decides. Names starting with a dot are skipped by * and ** unless you allow them, as in bash. Real tools differ in details, so use this as a close check, not a final word.
How to use it
- Enter glob patterns, one per line. Start a line with ! to exclude.
- Paste your file paths, one per line.
- Set the options for dotfiles, base name matching and case.
- Read which pattern matched each path.
Frequently asked questions
Which glob dialect is this?
It follows common bash and minimatch behaviour: * and ? stay within one folder, ** crosses folders, braces expand, and [abc] and [!abc] are classes. Differences between tools exist.
Why is a dotfile not matched by *?
Shells and most glob libraries hide names that start with a dot unless the pattern names the dot or an option allows it. Tick the dot option to include them.
Is !(pattern) supported?
No. Negated extglob is rejected with a message. Use a ! exclusion line instead.
Is this the same as .gitignore?
No. Gitignore has its own rules. Use the gitignore tester for those.