micromatch / micromatch/picomatch
Inconsistent Matching Behavior Between `(feature/**|feature*)` and `(feature*|feature/**)` for `feature/test/test`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 135
- Avg merge
- 23h 38m
- Merged PRs (30d)
- 7
Description
Issue Description:
The regular expressions (feature/**|feature*) and (feature*|feature/**) yield inconsistent results when matching the string feature/test/test. Specifically:
(feature/**|feature*)does not matchfeature/test/test.(feature*|feature/**)does matchfeature/test/test.
This behavior seems unexpected, as both expressions appear to be logically similar. Could you please clarify why this inconsistency occurs and provide guidance on the correct usage of these patterns?
Steps to Reproduce:
- Use the regular expression
(feature/**|feature*)to match the stringfeature/test/test. - Use the regular expression
(feature*|feature/**)to match the same string.
Expected Result:
Both expressions should either match or not match the string consistently.
Actual Result:
The first expression does not match, while the second one does.
Additional Context:
This issue might be related to the order of patterns in the alternation (|) or the interpretation of the * and /** operators. Any insights or documentation on this behavior would be greatly appreciated.
Thank you!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by reproducing both patterns against feature/test/test using the project's public matching interface, then identify where pattern-order and glob-operator behavior is documented. Done means explaining the differing results and documenting the correct usage or expected semantics.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100