/** * Simple glob matching for Configuration criteria. * Supports: * - `*` matches any sequence of characters (including empty) * - `?` matches exactly one character * Matching is case-sensitive. */ export function matchGlob(pattern: string, value: string): boolean { const regex = new RegExp( '^' + pattern .replace(/[.+^${}()|[\]\\]/g, '\\$&') .replace(/\*/g, '.*') .replace(/\?/g, '.') + '$' ) return regex.test(value) }