Glob Pattern Tester

Live

Glob Pattern Tester checks which file paths a glob pattern such as src/**/*.js matches.

Runs in your browser: what you enter is processed on your device and not uploaded to MyToolDock.

What is Glob Pattern Tester?

Glob Pattern Tester checks which file paths a glob pattern such as src/**/*.js matches. It follows the common glob rules: * and ? stop at a slash, ** crosses folders, [abc] and [!abc] match one character, and dot files are matched like any other file. Rules for .gitignore files differ, so test those in Git itself.

How It Works

  1. Enter one or more glob patterns and a list of file paths in the input fields on this page.
  2. Press the button to run Glob Pattern Tester.
  3. Read a match or no-match result for each path, and which pattern matched in the result area, and copy or download it.

Common Uses

Good to Know

Use {js,ts} to match several endings and ** to match any number of folders.

In more detail

Type one or more patterns, paste a list of paths, and each path is marked as a match or not, with the pattern that matched. A path matching any pattern counts.

Options let you ignore case, expand braces such as {js,ts} and {1..3}, and show only matches. Copy the matching paths when you are done.

Worked example

Results were compared with Python 3.13's pathlib full_match on 200 random sets of patterns and 6,000 paths, with and without case folding, plus brace and range expansion, odd characters in square brackets and paths written with ./ and double slashes.

Limits

* and ? never match a slash, ** matches any number of folders (a trailing ** needs at least one more name), [!abc] negates and [^abc] does not. There are no backslash escapes, and a pattern is matched against the whole path. .gitignore has extra rules such as matching a bare name at any depth and ! to re-include, so check those in Git.

Frequently Asked Questions

Does * match hidden files?

Yes, here it does, as in Python. Some shells skip them by default.

How do I match every .js file in any folder?

Use **/*.js.

Are my paths uploaded?

No. They are checked in your browser.

What does Glob Pattern Tester do?

Glob Pattern Tester checks which file paths a glob pattern such as src/**/*.js matches. It follows the common glob rules: * and ? stop at a slash, ** crosses folders, [abc] and [!abc] match one character, and dot files are matched like any other file. Rules for .gitignore files differ, so test those in Git itself.

What do I need to enter in Glob Pattern Tester?

One or more glob patterns and a list of file paths.

Is my data private in Glob Pattern Tester?

Your paths stay in your browser and are not uploaded.

Is MyToolDock Glob Pattern Tester free to use?

Yes, MyToolDock Glob Pattern Tester is 100% free with no registration, subscriptions, or limits. All features are fully unlocked.

Related Tools

SVG Pattern Generator .env and .properties to JSON Converter .env File Validator Ascii85 Encoder and Decoder Gitignore Generator HAR File Analyzer

More Developer Tools guides

More in Developer Tools · Browse all tools

Developer Scratchpad

Copied to clipboard!