> codebench_TOOL: HomeLOCAL-ONLY⌘K Switch

Glob Tester

Tool guide

Test glob patterns against file paths with live matching

Input: This tool processes input in your browser. Check in Network (opens in a new tab)

Preset:
Glob Patterns (one per line)
Syntax: * ** ? [abc] {a,b} !negation
File Paths (one per line)

Enter glob patterns and a list of file paths to see which files match in real time. Supports all standard glob syntax including *, **, ?, character classes [abc], brace expansion {a,b}, and negation !pattern. Toggle .gitignore mode for ordered pattern matching with negation. Includes presets for common patterns. All processing runs in your browser.

How to use it

  1. Put the sample paths in File Paths, one per line. Keep Match dotfiles, Case insensitive, and .gitignore mode off.
  2. Paste the recursive pattern into Glob Patterns and choose Test. The top-level and nested tests should have check marks.
  3. Replace the pattern with tests/*.spec.ts and test again. Only tests/cart.spec.ts remains matched. Restore the recursive pattern and turn on Match dotfiles if the scratch test should also run.

Worked example

File Paths
tests/cart.spec.ts
tests/ui/menu.spec.ts
tests/.scratch/draft.spec.ts
tests/ui/menu.test.ts
Glob Patterns
tests/**/*.spec.ts
Example output
Matched: 2/4 paths
✓ tests/cart.spec.ts
✓ tests/ui/menu.spec.ts
· tests/.scratch/draft.spec.ts
· tests/ui/menu.test.ts

In this pattern, **/ can stand for zero directories, so the original cart test still matches. The hidden directory and the wrong file suffix are two different reasons for exclusion.

What to watch for

Paste paths relative to the same root your pattern assumes, and omit shell quotes from the pattern editor. A runner started from another directory can report a different set of files.

Frequently asked question

Does the tester discover any files I forgot to paste?
No. It matches strings using picomatch and does not walk a filesystem. Use your runner’s own listing mode to confirm the discovered paths and its exclusion rules.

Browse DevTools tools

Further reading

> codebench $Ctrl+Enter Run