Boneyard Tools

Glob Pattern Tester

Type a glob pattern and a list of file paths to see which ones match, highlighted instantly. Supports star, globstar, single character, character classes and brace alternation, all in your browser.

How to test a glob pattern

  1. Enter a glob pattern such as src/**/*.ts in the pattern box.
  2. Paste one file path per line into the paths box.
  3. Read which paths match, shown highlighted, and copy the matches.

Examples

Match TypeScript files in any folder

Pattern "src/**/*.ts" on "src/a/b/c.ts" and "src/index.ts"
Both match: ** crosses directories and also allows none.

Brace alternation

Pattern "x.{js,ts}" on "x.ts", "x.js" and "x.md"
x.ts and x.js match, x.md does not.

Frequently asked questions

What is the difference between * and **?

A single star matches any characters except a slash, so it stays inside one path segment. A double star (globstar) also matches slashes, so it spans across directories. A pattern like src/**/*.ts matches files at any depth, including directly inside src.

Which glob features are supported?

Star (*), globstar (**), single character (?), character classes like [a-z], [abc] and negated [!abc], plus brace alternation like {js,ts}. Every other character is matched literally.

Does ? or * match a slash?

No. Both ? and a single * stop at a path separator, so they only match within one segment. Use ** when you need to cross directory boundaries.

What happens with an invalid pattern?

An unterminated character class like [abc or an unclosed brace group like {js,ts is reported as an invalid glob, and no paths are matched until you fix it.

Is this the same as gitignore matching?

It uses the same core wildcards you see in .gitignore and build configs, but gitignore adds extra rules for leading and trailing slashes and negation lines. This tool focuses on matching a path against one glob pattern.

Are my paths and pattern private?

Yes. Matching runs entirely in your browser and nothing is uploaded to a server.

Related tools