THE PRACTICAL GUIDE · NORMANDIN SYSTEMS
Get more from Picomatch Tester
Picomatch Tester checks glob-pattern matching using the Picomatch library so file-selection rules can be reviewed before use. Glob patterns describe filename or path matches and are different from regular expressions. Options such as matching hidden files or path separators can affect results, so use the same options and path style as the application that will consume the pattern. Code transformations are most useful when you know the language and the surrounding context of the snippet. Work from a saved copy and start with a small, valid example that demonstrates the behavior you need. Formatting, encoding, and generation do not establish that a program is correct. Review the output as source code, keep meaningful comments when appropriate, and test the result in the same environment that will eventually interpret it. This makes subtle changes much easier to spot.
Guide updated October 13, 2026
How to use this tool
- Paste a small, representative snippet and keep a copy of the input. Include the punctuation and delimiters needed to make the example meaningful.
- Enter a glob pattern and representative matching and nonmatching paths, then inspect the reported results and available options.
- Review the example below and compare its expected behavior with a small sample of your own input before continuing.
- Copy the result into a scratch file and verify it with the intended parser, editor, or test environment before replacing the original code.
SEE IT IN PRACTICE
A worked example
Pattern *.js tested against app.js and app.css
app.js matches; app.css does not, with ordinary matching settings
The wildcard covers the filename portion while the literal extension restricts the match to the selected suffix.
Globs describe paths rather than arbitrary regex syntax
A wildcard pattern such as *.js is a glob, not the regular expression that happens to use similar punctuation. Directory separators, globstars, braces, and hidden-file behavior belong to the matching library's rules and options. Test the same form of path that the consuming application supplies: a bare filename, a relative path, and an absolute path can produce different results. Include examples with multiple directory levels to see whether the pattern's scope is what you intended.
Build a match and nonmatch matrix
A useful test set includes the desired file, a similar file that should be excluded, a nested path, a hidden file, and a filename with unusual punctuation. If a build configuration uses several include and exclude patterns, test each rule and then consider their combined ordering or precedence in that application. The tester establishes Picomatch behavior for the chosen inputs and options; it cannot establish how a separate build tool wraps the library or preprocesses paths before matching.
When this tool is useful
- Review a build inclusion pattern
- Understand glob matching behavior
- Test an exclusion rule before applying it to a file collection
Tips for a better result
- Include a nested path, an excluded extension, a hidden file, and a boundary case relevant to your actual file-selection rule.
- Separate a syntax check from a behavior check. A snippet can parse successfully while producing the wrong value, selecting the wrong element, or changing an important edge case.
- Keep the source and the settings used for this result together. That makes a later comparison or correction easier, especially when another person needs to reproduce the same outcome.
Frequently asked questions
Does a filename glob behave the same on nested paths?
A pattern that works for a bare filename may behave differently for a nested path. Hidden files and Windows separators also require deliberate checks.
Can I use generated or transformed code immediately?
Treat the result as a draft to review. Check names, escaping, syntax, and assumptions in the target environment, then run a representative test. The tool cannot see the wider application or know every requirement that applies to it.
How do I investigate unexpected output?
Reduce the input to the smallest example that still shows the issue. Check the chosen language or mode, inspect special characters and whitespace, and compare with the original. Add complexity back gradually after the basic example works.
What happens to the information I enter?
The utility processes your input in this browser. Some tools retain field values in browser storage or the URL; avoid entering secrets in shareable fields. Page and asset requests still go to the hosting provider. Read the privacy and offline-use notes for details.