evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a pattern matching utility that supports custom numeric range expansion in glob patterns.
Your utility should:
{start..end}{1..3} expands to match "01", "02", "03")The matcher should:
file{1..5}.txt which should match files like "file01.txt", "file02.txt", through "file05.txt"logs/session{10..12}/data.log)*, ?) in combination with custom ranges/**
* Creates a matcher function with custom range expansion support.
*
* @param {string} pattern - A glob pattern that may contain numeric ranges like {start..end}
* @returns {Function} A function that tests if a string matches the pattern
*/
function createMatcher(pattern) {
// Implementation
}
module.exports = { createMatcher };Provides glob pattern matching capabilities.