Glob Pattern Samples
Glob pattern examples for file matching from basic to complex patterns
Key Facts
- Category
- Development
- Items
- 12
- Format Families
- text
Sample Overview
Glob pattern examples for file matching from basic to complex patterns This sample set belongs to Development and can be used to test related workflows inside Elysia Tools.
📝 Simple Wildcard Pattern
Basic pattern using * to match any characters
*.txt
📝 File Extension Match
Match files with multiple extensions
*.{js,ts,jsx,tsx}
📝 Directory Pattern
Match files in a specific directory
src/*.ts
📝 Nested Directories
Match files in nested directory structure
src/components/*.tsx
📝 Recursive Pattern (Globstar)
Match files recursively using ** pattern
src/**/*.ts
📝 Complex Recursive Pattern
Deep nested pattern with multiple wildcards
**/*.{test,spec}.{js,ts}
📝 Character Class Pattern
Using character classes [abc] for precise matching
src/[A-Z]*.ts
📝 Brace Expansion
Using {a,b,c} for multiple alternatives
src/{components,utils,types}/*.ts
📝 Numbered and Date-stamped Pattern
Pattern for matching numbered or date-stamped files
logs/app-[0-9]*.log
backup-[0-9][0-9][0-9][0-9]-[0-1][0-9]-[0-3][0-9].tar.gz
📝 Negation Pattern
Exclude patterns using ! prefix
src/**/*.ts
!**/*.test.ts
!**/*.spec.ts
📝 Comprehensive Project Pattern
Complex pattern for complete project matching
src/**/*.{ts,tsx}
!**/*.test.ts
!**/*.spec.ts
!**/node_modules/**
public/**/*.html
**/*.json
📝 Multiple Ignore Patterns
Common patterns for build tools and gitignore
**/*.ts
!**/*.d.ts
!**/node_modules/**
!**/dist/**
!**/.git/**
**/*.graphql
**/*.gql