Skip to content
AZ Tools

Glob Pattern Tester

Test file paths against a glob pattern (*, **, ?, [...], {a,b}) in your browser.

ResultsMatched: 2 / 5
  • src/index.tsmatch
  • src/lib/util.tsmatch
  • src/index.jsno match
  • README.mdno match
  • test/spec.tsno match

How to use

  1. Enter a glob pattern such as src/**/*.ts.
  2. Paste one file path per line into the paths box.
  3. Each path is marked as a match or no match, with a count summary.

About this tool

Show

Type a glob pattern and a list of file paths and see at a glance which ones match, with a running count of hits. The pattern is compiled to a regular expression the way most build tools do it: braces are expanded first, including nested ones, then each segment is translated. A single star and a question mark stay inside one path segment and never cross a slash, while a double star between slashes matches zero or more directories — which is why src/**/*.ts also matches src/index.ts, a case people often expect to fail. A trailing double star matches everything below the prefix. Note that a leading dot is not special here, so a star does match .env, unlike in a shell. Everything runs locally in your browser — nothing is uploaded.

Frequently asked questions

What is the difference between * and **?

A single * matches any characters within one path segment (it stops at /). A double ** matches across segments, including slashes, so src/**/*.ts also matches src/a.ts.

Are brace patterns supported?

Yes. {a,b,c} expands to alternatives, so img.{png,jpg} matches img.png and img.jpg. Nested and multiple braces are supported.

Is matching case-sensitive?

Yes. Patterns are matched case-sensitively against the full path, anchored at both ends.

Is my data sent anywhere?

No. Matching happens entirely in your browser; nothing is uploaded.

Why does src/**/*.ts match src/index.ts with no directory in between?

Because ** between slashes means zero or more directories, not one or more. That is the standard behaviour in build tools and the reason the pattern is written that way — src/*/*.ts is what you would use if you truly required at least one subdirectory.

Does * skip dotfiles the way a shell does?

No. A leading dot is not special here, so * matches .env and .gitignore. Bash hides them unless you set dotglob, and some libraries follow that convention while others do not — worth checking against whichever tool will actually run your pattern.

Related tools