Glob Pattern Tester

Pattern Explanation

**/Match any directory depth (zero or more directories)
*Match any characters except /
.tsLiteral: ".ts"

Results6 matched / 19 unmatched

src/index.ts
src/App.tsx
src/components/Header.tsx
src/components/Footer.tsx
src/components/ui/Button.tsx
src/components/ui/Modal.tsx
src/hooks/useAuth.ts
src/hooks/useTheme.ts
src/utils/helpers.ts
src/utils/format.ts
src/__tests__/App.test.tsx
src/__tests__/helpers.test.ts
package.json
tsconfig.json
README.md
.env
.gitignore
node_modules/react/index.js
node_modules/react/package.json
public/logo.png
public/favicon.ico
public/images/hero.jpg
public/images/bg.svg
dist/bundle.js
dist/bundle.css

What This Tool Does

Glob Pattern Tester is built for deterministic developer and agent workflows.

Test glob patterns against file paths with real-time matching — supports gitignore, tsconfig, and shell syntax.

Use How to Use for execution steps and FAQ for constraints, policies, and edge cases.

Last updated:

This tool is provided as-is for convenience. Output should be verified before use in any production or critical context.

Agent Invocation

Best Path For Builders

Browser workflow

Runs instantly in the browser with private local processing and copy/export-ready output.

Browser Workflow

This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.

/glob-pattern-tester/

For automation planning, fetch the canonical contract at /api/tool/glob-pattern-tester.json.

How to Use Glob Pattern Tester

  1. 1

    Test .gitignore patterns before committing

    Enter glob patterns (e.g., '*.log', 'node_modules/**', 'dist/*.js') and test against actual file paths you want to ignore. Verify the pattern matches your intent before adding to .gitignore.

  2. 2

    Build file matching rules for build tools

    Write webpack entry patterns or TypeScript include/exclude paths. Test glob patterns like 'src/**/*.tsx' against your file tree to ensure bundler catches exactly what you want.

  3. 3

    Validate backup exclusion patterns

    If backing up a project, test glob patterns to exclude large directories ('node_modules/**', '.git/**'). Confirm the tester shows 0 matches for paths you want to skip.

  4. 4

    Test nested wildcard matching for multi-level directories

    Patterns like 'src/**/components/*.tsx' or 'tests/**/__snapshots__/**' can be tricky. Use the tester to verify ** correctly matches any depth, not one level.

Frequently Asked Questions

What is a glob pattern?
A pattern syntax using wildcards (*, **, ?) to match file paths. Used in .gitignore, tsconfig.json, eslint configs, webpack, Docker, GitHub Actions, and shell commands.
What does ** mean in a glob?
** matches any number of directories, including zero. For example, src/**/*.ts matches TypeScript files at any depth under src/ — including src/utils/helpers.ts.
Why do .gitignore patterns work differently?
.gitignore has special rules: patterns without / match anywhere in the tree, a trailing / matches only directories, and ! negates a previously-matched pattern. This tool supports these semantics.
Can I test multiple patterns at once?
Yes, enter multiple patterns (one per line) to see which patterns match which files. A matrix view shows the relationship between patterns and file paths.
Is this tool free?
Yes, Free to use and privacy-first by design. All pattern matching runs locally in your browser with no server communication.