Git Conventional Commit & URL Converter
About Glob → Regex Converter
The Glob to Regular Expression (RegExp) Converter transforms file globbing patterns (`src/**/*.{ts,tsx}`, `docs/v[0-9]/*`) into exact JavaScript, Python, and PCRE regular expression strings.
How to Use Glob → Regex Converter
Step 1
Enter your file glob pattern in the input box.
Step 2
Select target regex engine (JavaScript, Python, or Go).
Step 3
Review the converted regular expression pattern and code snippet.
Step 4
Click "Copy RegExp".
Practical Use Cases for Glob → Regex Converter
Implementing Custom File Routing in Node.js & Go
Convert user-defined glob patterns into executable regular expressions for custom server routing and file watching engines.
Understanding How Webpack & Vite Translate Globs
Inspect the underlying regexes generated by bundlers when resolving dynamic `import.meta.glob()` modules.
Input & Output Examples
Converting Globstar to RegExp
`src/**/*.test.{js,ts}``^src\/(?:.*\/)?([^\/]+)\.test\.(?:js|ts)$`
Key Features & Performance
- ✓Converts `*` to `[^\/]*`, `**` to `(?:.*\/)?`, `?` to `[^\/]`, and `{a,b}` to `(?:a|b)`.
- ✓Configurable flags (case-insensitive `i`, multiline `m`).
- ✓Generates copy-pasteable JavaScript `new RegExp(...)` and Python `re.compile(...)` code snippets.
- ✓100% Client-Side memory execution.
- ✓1-Click Copy regex pattern.
Key Terminology & Definitions
Glob-to-RegExp Transpilation
Translating filesystem path wildcards into formal regular expression syntax with path delimiter boundaries.
Non-Capturing Group (`(?:...)`)
Used in generated regexes to handle brace alternation without polluting regex capture group indices.
